This is my query
update b
set b.col1 = if(1) <= 0
begin
select 1 as bal
end
else
select 0 as bal
from
dbo.table1 b
inner join dbo.table1 a
on b.id = a.id
and b.date = a.date
The "IF" part works great by itself. Puting it in this query form throws
Incorrect syntax near the keyword 'if'.
am I missing something other than sleep.