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.
Author |
Topic |
ravininave
Posting Yak Master
111 Posts |
Posted - 2012-12-12 : 03:32:32
|
My Table: BoardMastStructureAppMstID inttCount intlDate DatetimeSrNo intINSERT INTO BoardMast (1,1,'2012-12-12 13:19:04.873',3)INSERT INTO BoardMast (2,2,'2012-12-12 13:20:08.407',7)INSERT INTO BoardMast (3,2,'2012-12-12 13:21:07.647',5)INSERT INTO BoardMast (4,0,'2012-12-12 13:22:08.257',NULL)INSERT INTO BoardMast (5,0,'2012-12-12 13:23:23.853',NULL)INSERT INTO BoardMast (6,0,'2012-12-12 13:25:18.887',NULL)INSERT INTO BoardMast (7,0,'2012-12-12 13:29:38.743',NULL)I wish to order on tCount Desc, lDate Descfor that I wrote:Select * from BoardMast order by tCount desc ,lDate desc;it returns3217654first 3 are correct but another 4 are not in order of dateit should 4567Can anyone correct the query. VB6/ASP.NET------------------------http://www.nehasoftec.com |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-12-12 : 03:53:58
|
Select * from BoardMast order by tCount desc ,lDate desc;--Chandu |
|
|
|
|
|
|
|