Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FETCH using the same value
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:
11
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

Click here to load this message in the networking platform