Can anyone assist me with the following?
I'll write it generically so I can be assisted better
with (****) being the problem code
Insert into Grants
( id,type,requestdate,project,budgetdate)
Select
a1,'B',getdate(), @dd, (****)
from vw_test
Where fiscalyear = @intFY
(****) should be
IF GrantAmount is Null
Set @newbudgetamount = budgetamount
Else
Set @newbudgetamount = grantamount
end
I've tried different combinations but I always get an error message about syntax
even with begin/ends
I'll write it generically so I can be assisted better
with (****) being the problem code
Insert into Grants
( id,type,requestdate,project,budgetdate)
Select
a1,'B',getdate(), @dd, (****)
from vw_test
Where fiscalyear = @intFY
(****) should be
IF GrantAmount is Null
Set @newbudgetamount = budgetamount
Else
Set @newbudgetamount = grantamount
end
I've tried different combinations but I always get an error message about syntax
even with begin/ends