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 |
|
label
Posting Yak Master
197 Posts |
Posted - 2003-08-04 : 16:36:51
|
| Is a "for x=1 to total / next x" type of loop available in Stored Procs? I've looked in the books online and there's mention of a For clause but it doesn't look to be exactly what I need. |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-08-04 : 16:42:37
|
SET NOCOUNT ONDECLARE @x int, @Total intSELECT @x = 1, @Total = 10WHILE @x <= @Total BEGIN SELECT @x SELECT @x = @x + 1 END Brett8-)SELECT POST=NewId() |
 |
|
|
label
Posting Yak Master
197 Posts |
Posted - 2003-08-05 : 09:12:22
|
quote: Originally posted by X002548
SET NOCOUNT ONDECLARE @x int, @Total intSELECT @x = 1, @Total = 10WHILE @x <= @Total BEGIN SELECT @x SELECT @x = @x + 1 END Brett8-)SELECT POST=NewId()
Thanks Brett....looks like that'll do perfectly. |
 |
|
|
|
|
|