November 22, 2010 at 3:40 pm
Hi,
I am running below query in sql studio and I am getting syntax error near inner, any suggestions??
Thank You
UPDATE [dbo].[progoogle] INNER JOIN [dbo].[stocktb] ON [dbo].[progoogle].productid = [dbo].[stocktb].[productid] SET [dbo].[progoogle].[ActiveFlag] = 'N' WHERE [dbo].[stocktb].[available_qty] = '0' and [dbo].[stocktb].[avaiable_qty_temp] = '0'
November 22, 2010 at 3:47 pm
Please see BOL (BooksOnLine, the SQL Server help system usually installed together with SQL Server) for the correct syntax (SET before FROM part):
UPDATE [dbo].[progoogle]
SET [ActiveFlag] = 'N'
FROM [dbo].[progoogle]
INNER JOIN [dbo].[stocktb] ON [dbo].[progoogle].productid = [dbo].[stocktb].[productid]
WHERE [dbo].[stocktb].[available_qty] = '0' and [dbo].[stocktb].[avaiable_qty_temp] = '0'
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply