|
declare @isWastage bit
declare @partcode varchar(20)
set @isWastage=1
set @PartCode='1234567890'
if @isWastage=1 --Requires the calculation result to include loss
select fpartcode, dosage INTO #TMP2 from tbom007d where fparentpartcode = @PartCode
else
select fpartcode, dosage*2 INTO #TMP2 from tbom007d where fparentpartcode = @PartCode --This line is wrong
The following error occurred:
Server: Message 2714, Level 16, State 1, Line 11
An object named'#TMP2' already exists in the database.
what happened? Thank you |
|