Hi All,
Can anyone explain why I get an Error 2714 when I attempt to create a temporary table under separate branches of an IF statement?
To reproduce the problem, try the following:
create procedure StupidError as
if (1 = 1) select 1 as 'Field1' into #tmpTable
else select 2 as 'Field1' into #tmpTable
Is my syntax off? If so, please enlighten me.
I have a workaround so it's not a big deal at this point. But it was a major PITA when it cropped up.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao