Дед Анвирыч
Новичок
mssql curcor
говорит:
Server: Msg 137, Level 15, State 1, Line 9
Must declare the variable '@ac_id'.
Server: Msg 137, Level 15, State 1, Line 15
Must declare the variable '@ac_id'.
Server: Msg 137, Level 15, State 1, Line 18
Must declare the variable '@ac_id'.
в чем бага?
PHP:
DECLARE @aс_id int(4), @sub_id int(4)
DECLARE cursor427 CURSOR FOR
SELECT aс_id, sub_id
FROM #acnsub
OPEN cursor427
FETCH NEXT FROM cursor427
INTO @ac_id, @sub_id
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO #test
(ac_id, sub_id, cn_id, price, tax, qty, t_month, p_month, is_rent, started, man, status)
VALUES (@ac_id, @sub_id, 0, 0, 0, 1, 1, 0, 0, '01 feb 2003', 0, 0)
FETCH NEXT FROM cursor427
INTO @ac_id, @sub_id
END
Server: Msg 137, Level 15, State 1, Line 9
Must declare the variable '@ac_id'.
Server: Msg 137, Level 15, State 1, Line 15
Must declare the variable '@ac_id'.
Server: Msg 137, Level 15, State 1, Line 18
Must declare the variable '@ac_id'.
в чем бага?