Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

working with daily results : results per day

 
   Database Forums (Home) -> General Discussions RSS
Next:  Process hanging on Endselect  
Author Message
rapataa

External


Since: Mar 22, 2005
Posts: 1



(Msg. 1) Posted: Fri Aug 05, 2005 7:55 am
Post subject: working with daily results : results per day
Archived from groups: comp>databases>ms-sqlserver (more info?)

Hi,

I'm trying to get an overview of counted visits per day for a
webapplication.
The thing is that SQL doesn't work with full days. For instance: getdate()
returns a fulldate instead of a date in the format 'yyyy-mm-dd'. I need this
format, without time specifics, to be able to group rows.

something like:

SELECT count(id), dtVisit
FROM tblName
GROUP BY dtVisit

and I would like to be able to show the results per day for an x amount of
(full) days.

anyone any idea?

 >> Stay informed about: working with daily results : results per day 
Back to top
Login to vote
jcelko2121

External


Since: Dec 07, 2004
Posts: 587



(Msg. 2) Posted: Sun Aug 07, 2005 5:06 pm
Post subject: Re: working with daily results : results per day [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Try building a Calendar table with the start and end times for each
day. You can add other information, like holidays, quarters, fiscal
years, etc, Using functions is proprietary and slow.

You also ought to look at ISO-11179 so you will stop putting "tbl-" and
"dt-" prefixes on your data elements.

 >> Stay informed about: working with daily results : results per day 
Back to top
Login to vote
shumaker

External


Since: Apr 12, 2005
Posts: 7



(Msg. 3) Posted: Mon Aug 08, 2005 11:33 am
Post subject: Re: working with daily results : results per day [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Where do I find this ISO-11179 that you speak of in a digestable
format? I google it and find snippets here and there, and even
documents for sell, but nothing very fruitful.
 >> Stay informed about: working with daily results : results per day 
Back to top
Login to vote
jcelko2121

External


Since: Dec 07, 2004
Posts: 587



(Msg. 4) Posted: Mon Aug 08, 2005 12:43 pm
Post subject: Re: working with daily results : results per day [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have summarized the rules in SQL PROGRAMMING STYLE. The basic idea
is to name somethign for what it is and not for where it is located,
how it is used in one place or how it is stored.
 >> Stay informed about: working with daily results : results per day 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
filtering results by input box? - Hi, i'm new to mssql, i've come from php/mysql.. anyway, i'm using SQL Server 2005.. I've connected to the DB using dreamweaver and sucessfully displayed a recordset on a page as follows: <%@ Page Language="VB" ContentType="text/html&...

Why Same query results in two different # in SQL Server vs.. - Hello, I have one simple query joining two tables with left outer join on 3 fields and using MIN on two fields. These two tables have lot of data about 3 mil in total. I am trying to migrate db from MS Access to SQL 2005. I get about 689000 rows in SQL..

Identifying results sets when stored procedure called mult.. - I have a report based on our product names that consists of two parts. Both insert data into a temporary table. 1. A single grouped set of results based on all products 2. Multiple tables based on individual product names. I am getting data by calling....

((cdate("1/1/2001")+30) as task_due_date (Not working) - I have the below function written in VB, and everything works fine EXCEPT that the sql code is not executing correctly. The date field is in the table always shows "12/1/1899 11:59:17 PM" no other date. I'm should have the date of the input i...

ORDER BY in VIEW not working -
   Database Forums (Home) -> General Discussions All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]