Message
From
12/06/2008 13:56:58
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Miscellaneous
Thread ID:
01323549
Message ID:
01323561
Views:
15
Why did that work? What is the relationship between the FETCH and the BEGIN?

>>There are many ChartID values in the ChartID table, but this is only using the first one in the FETCH. The results all have a ChartID of 1. If I run the SQL that creates the ChartID cursor separately, it shows many ChartID rows. What am I missing?
>>
.
.
.
>use
>
>FETCH NEXT
>	FROM ChartID
>	INTO @ChartID
>	WHILE @@FETCH_STATUS = 0
>
>BEGIN
>   -- Testing ONLY!
>   PRINT @ChartID
>   ...
>
Previous
Next
Reply
Map
View