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 |
sbeckel26
Starting Member
1 Post |
Posted - 2009-05-26 : 17:20:53
|
Hello,I am creating an SQL report in VS 2008 that calls for one of my datasets to use multiple loops to craft the data I am looking for. However, on just implementing a simple TSQL WHILE loop, I am finding VS 2008 simply ignoring the loop and processing my request only once. I broke the syntax down to just the following (removing the database specific data):DECLARE @counter intSET @counter = 0WHILE @counter < 24BEGIN SELECT @counter AS Num set @counter = @counter + 1 ENDThis statement works great when run from SQL Express 2008 but only produces a single row when run within the VS 2008 report designer. Has anyone run into this before? If so, what is the solution here that I am missing?Thanks |
|
iesoccer
Starting Member
3 Posts |
Posted - 2009-05-28 : 11:33:07
|
If everything works at the SQL Server level, i would suggest creating a stored procedure to do this and add that to the data set in the report. |
 |
|
|
|
|