I get the following error when I try and use a GOTO statment with my abel at the bottom of the script:
[[A GOTO statement references the label 'ENDSCRIPT' but the label has not been declared.]]
My code structure is as follows:
Some code here
SET NOCOUNT OFF
SELECT * FROM PERSON_STAGE1 WHERE PERSONUID
IN (SELECT PERSONUID FROM PRO_SING_QA_26923_AMMAR..PERSONUID)
IF @.@.ROWCOUNT > 1
BEGIN
PRINT '*** ERROR: SCRIPT ENDING BECAUSE OF DUPLICATE UID'
GOTO ENDSCRIPT
END
SET NOCOUNT ON
.
.
.
.
.
ENDSCRIPT:
when I execute my code I get the error message mentioned above. Any suggestions?
Thanks in advance.hi,
your script (as much as you have posted) works fine in my enviroment !
markus
No comments:
Post a Comment