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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-01-22 : 10:09:26
|
| Andris writes "I have one table with orders.The problem is that I want to sort this records by DATE (when they were made) and by Order company names.How could I make it from 1 table?I tried something like this:"SELECT ID, Date_Ordered, Company FROM ORDERS ORDER BY ORDER_DATE AND GROUP BY COMPANY"BUT THIS RETURNS AN ERROR.How could Imake this query work?Thanks[I have WINNT AND SQL SERVER 2000]" |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2002-01-22 : 10:21:57
|
| Your group by and order by statements are the wrong wat round i believe |
 |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-01-22 : 10:30:44
|
| SELECT ID, Date_Ordered, Company FROM ORDERS ORDER BY ORDER_DATE ,companyshould do what you are looking for.--------------------------------------------------------------Dont Tell God how big your Problem is , Tell the Problem how Big your God is |
 |
|
|
|
|
|