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 - 2005-08-16 : 08:03:38
|
| Stijn writes "Hello, I have SQL 7 with WINDOWS 2000 SERVERMy problem is that i am looking for a script my db is for equipement inventoryhow can i select all the records from a room, if this room (room1)has less of 100 records he needs te go to the follow room(room2), en the next room until he's got 100 records, sorry for my english" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
raclede
Posting Yak Master
180 Posts |
Posted - 2005-08-17 : 01:27:18
|
| SET ROWCOUNT 100SELECT * FROM YourTable WHERE Room='Room1' UNIONSELECT * FROM YourTable WHERE Room='Room2' UNIONSELECT * FROM YourTable WHERE Room='Room3' UNIONSELECT * FROM YourTable WHERE Room='Room4' |
 |
|
|
|
|
|