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 |
|
sudheer.v538@gmail.com
Starting Member
10 Posts |
Posted - 2007-07-31 : 09:01:55
|
| Hi forum members... I need a query to get the numbers inbetween 1 and 50.Here i know first record id = 1 and max(id) = 50. I need the output like...1234...50 Please help me... |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-07-31 : 09:20:46
|
If lower limit is greater than or equal to zero, and upper limit is less than or equal to 255 in sql server 2000 (2047 in sql server 2005), you can useSELECT Number FROM master..spt_values WHERE Type = 'p' AND Number BETWEEN 1 AND 50 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
|
|
|
|
|