Generate Script Ins/Upd SP Syntax Issue
Posted: Wed 15 Feb 2017 16:59
I tried the option "Generate Script As" - "Insert/Update Stored Procedure" and noticed it is generating with a syntax problem.
The table name is "Communications" and so the SP name that it generates is "communications_IU" which is fine, however the update statement uses the SP name instead of the table name in the query.
eg.
should be .....
version 5.4.215
The table name is "Communications" and so the SP name that it generates is "communications_IU" which is fine, however the update statement uses the SP name instead of the table name in the query.
eg.
Code: Select all
IF EXISTS
(SELECT * FROM dbo.communications WHERE Pk = @Pk)
UPDATE communications_IU SET
Direction = ....
Code: Select all
IF EXISTS
(SELECT * FROM dbo.communications WHERE Pk = @Pk)
UPDATE communications SET
Direction = ....