Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need help ordering data per day

Author  Topic 

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2009-02-24 : 15:40:59
Hi Group I have a table with the Following Data
dbo.Trending_Data (Table)

Area -------Day--------Count_Opent_Ticket---
IT. Security 02/24/2009 20
IT. Infra 02/11/2009 39
Helpdesk 02/09/2009 42
IT Global 02/13/2009 50


What I really need is for all the records to be in order by Day
Example 02/09/2009, 02/11/2009, 02/13/2009, 02/24/2009

Do you thing order by will work?

Thanks,

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-02-24 : 15:44:03
Whats the datatype of "Day"
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-24 : 15:58:29
quote:
Originally posted by osirisa

Hi Group I have a table with the Following Data
dbo.Trending_Data (Table)

Area -------Day--------Count_Opent_Ticket---
IT. Security 02/24/2009 20
IT. Infra 02/11/2009 39
Helpdesk 02/09/2009 42
IT Global 02/13/2009 50


What I really need is for all the records to be in order by Day
Example 02/09/2009, 02/11/2009, 02/13/2009, 02/24/2009

Do you thing order by will work?

Thanks,




Order by Day
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-02-25 : 02:55:59
quote:
Originally posted by sodeep

quote:
Originally posted by osirisa

Hi Group I have a table with the Following Data
dbo.Trending_Data (Table)

Area -------Day--------Count_Opent_Ticket---
IT. Security 02/24/2009 20
IT. Infra 02/11/2009 39
Helpdesk 02/09/2009 42
IT Global 02/13/2009 50


What I really need is for all the records to be in order by Day
Example 02/09/2009, 02/11/2009, 02/13/2009, 02/24/2009

Do you thing order by will work?

Thanks,




Order by Day



Wont work if the column is not datetime or smalldatetime datatype

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-02-25 : 03:00:49
1. For the four sample data it will.
2. If all records are for 2009 it will.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -