2
Answers

Incorrect syntax near the keyword As

anil john

anil john

12y
2.3k
1
Plz help me to rectify the error:

Error: Incorrect syntax near the keyword 'As'.


Code:

declare @flag  as int;
SET @flag='1';
SELECT     Ci.iInstNumber AS InstNo,Ci.dInstDate AS InstDate,  CASE WHEN (@flag='1')THEN SUM(Ci.fInstAmount+Ci.fShareProfit)  ELSE Ci.fInstAmount As InstAmount END
Answers (2)