Hi,
I want to Update a SQL Table value on condition that a 2nd Table exists.
ie.
IF Table2 exists
Code:
UPDATE dbo.Update_Status
SET dbo.Update_Status.Status = '1'
WHERE EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE='BASE TABLE'
AND TABLE_NAME='Table2')
The above code produces (0) Rows Affected
How do I output the value of '1'?
Thanks in advance,
Neal
A Northern Soul