我已經檢查了好幾次。列數尚未匹配我不斷收到一個錯誤說的提取到語句不符合計數在INTO列表中聲明的變量數量必須與選定列的變量數量相匹配
declare cur_range CURSOR FOR
SELECT
GroupID,
OddEven,
RangeLow,
RangeHigh
PostCode1,
PostCode2,
ID,
OldPrimaryID,
ThFareID
FROM tmpNewPrimaryRange;
OPEN cur_range
FETCH NEXT FROM cur_range
into
@cur_GroupID
, @cur_OddEven
, @cur_RangeLow
, @cur_RangeHigh
, @cur_PostCode1
, @cur_PostCode2
, @cur_ID
, @cur_OldPrimaryID
, @cur_ThFareID
Error: Cursorfetch: The number of variables declared in the INTO list must match that of selected columns.
應該有2'FETCH NEXT'您的查詢,您可以顯示第二個? – Lamak
@Lamak,我剛剛編輯它 – dko
並沒有更多的遊標?,一個調用使用遊標的sp? – Lamak