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
>
> PRINT @ChartID
> ...
>