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 |
|
jgallen23
Starting Member
17 Posts |
Posted - 2007-01-02 : 19:13:57
|
| Is there any way to pass a variable to return the top X number of rows? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-01-02 : 19:35:11
|
| http://www.sqlteam.com/item.asp?ItemID=233Tara Kizer |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-02 : 20:27:24
|
| Since this is now a SQL2005 forum, the solution is very easy.SELECT TOP (@Number) * FROM <YourTableNameHere>Peter LarssonHelsingborg, Sweden |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-01-02 : 22:01:42
|
| Ahhh, didn't notice that. I'll have to pay more attention to the forum names now.Tara Kizer |
 |
|
|
|
|
|