anil john

anil john

  • NA
  • 156
  • 204.5k

Incorrect Yntax near AS

Nov 9 2012 4:46 AM
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 (1)