sql server - Incorrect syntax near UPDATE, expecting external error when creating stored procedure -
if object_id('*[dbo].[updatedata]*', 'u') null begin create proc [dbo].[updatedata] update [db1].[dbo].[staff] set [name1]= 'value1', [name2]= 'n2', [name3]= 'n3' [db1].[dbo].[staff] s left outer bring together [db1].[dbo].[table1] si on s.[id]=si.[id] return; end
does 1 know why above code snippet generating "incorrect syntax near update, expecting external" @ update key word in line below update [db1].[dbo].[staff]
change update query this
update [db1].[dbo].[staff] set [name1]= s.[bpnumber], [name2]= 'n2', [name3]= 'n3' [db1].[dbo].[staff] s left outer bring together [db1].[dbo].[table1] si on s.[id]=si.[id] sql-server tsql
No comments:
Post a Comment