28.07.2008, 23:24 | #1 |
Гость
|
Где ошибка? (апгрейд на ах2009)
[Microsoft][SQL Native Client][SQL Server]Invalid column name 'F2'.
Код: DECLARE @VTABLEID INT, @VNEXTRECID BIGINT,@TMP_ROW_CNT BIGINT; SET @VTABLEID = 2832; DECLARE C_F CURSOR FOR SELECT NEXTVAL FROM SYSTEMSEQUENCES WHERE ID = -1 AND TABID = @VTABLEID FOR UPDATE; BEGIN IF OBJECT_ID(N'TEMPDB..#DEL_UPGRADEBUSRELTABLE_TMP') IS NOT NULL DROP TABLE #DEL_UPGRADEBUSRELTABLE_TMP SELECT CONVERT(NVARCHAR(20),'') AS F3,BUSRELACCOUNT AS F1,RECID AS F2 , DEL_CUSTACCOUNT as F4 , DEL_VENDACCOUNT as F5 , DATAAREAID AS DATAAREAID, 1 AS RECVERSION, IDENTITY(BIGINT,1,1) AS RECID INTO [#DEL_UPGRADEBUSRELTABLE_TMP] FROM SMMBUSRELTABLE A WHERE (DATAAREAID= N'ATC') AND PARTYID = ' ' UPDATE #DEL_UPGRADEBUSRELTABLE_TMP SET F3 = [dbo].FN_FMT_NUMBERSEQUENCE('',RECID,12,0); SET @TMP_ROW_CNT =( SELECT COUNT(RECID) FROM #DEL_UPGRADEBUSRELTABLE_TMP) OPEN C_F FETCH NEXT FROM C_F INTO @VNEXTRECID UPDATE SYSTEMSEQUENCES SET NEXTVAL = NEXTVAL + @TMP_ROW_CNT WHERE ID = -1 AND TABID = @VTABLEID; CLOSE C_F DEALLOCATE C_F INSERT INTO DEL_UPGRADEBUSRELTABLE (PARTYID,BUSRELACCOUNTID,BUSRELRECID ,CUSTACCOUNTID ,VENDACCOUNTID ,DATAAREAID,RECVERSION,RECID) SELECT F3,F1,F2 ,F4 ,f5 ,DATAAREAID,RECVERSION,RECID+@VNEXTRECID FROM #DEL_UPGRADEBUSRELTABLE_TMP IF OBJECT_ID(N'TEMPDB..#DEL_UPGRADEBUSRELTABLE_TMP') IS NOT NULL DROP TABLE #DEL_UPGRADEBUSRELTABLE_TMP END; |
|
29.07.2008, 14:18 | #2 |
Гость
|
TAGS: Invalid column name 'F2' ошбика error 2009 апгрейд upgrade ax2009 база database C_F CURSOR EXISTS insertIntoPartyUpgradeTables ODBC call reason code 100
короче у кого такая или похожая ошибка возникнет при апгрейде на 2009, пишите мне я вам за огромные бабки буду помогать ) Последний раз редактировалось ahtoh; 29.07.2008 в 14:23. |
|
|
За это сообщение автора поблагодарили: mazzy (-5). |
30.07.2008, 07:47 | #3 |
Участник
|
|
|