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-08-26 : 11:18:24
|
| Anitha writes "Hi, We would like to display the record according to the author name. I.e. The Particular author books should be displayed first (i.e. if we have 5 records under particular author name it should display the record of this author first and then from 6th record onwards display other author name records from the same table) and display other records. Now I am displaying the record according to the recordid. We separate the record stored according to the website where we get the books. For example we have stored books from two different website and have given two id value to differentiate the books from the website. The query is “ SELECT * FROM BOOKS WHERE BOOKSITEID=2”. I.e. books record from a particular website.How should I change the query to display according to the above requirement? Could you please help me? Thank you." |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-08-26 : 12:19:31
|
| order by case when author = @author then 0 else 1 end ,RecordID==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|