Akhter HUssain

Akhter HUssain

  • 1.1k
  • 902
  • 24.3k

Common table expression defined but not used.

Jun 9 2020 3:08 AM
Getting following error
 
Msg 422, Level 16, State 4, Line 9
Common table expression defined but not used.
 
  1. with vals  
  2. as  
  3. (  
  4. select I_QTY as Iss  From tbl_Issuance where I_Type='Issue'  
  5. union all  
  6. select I_QTY as Ret1  From tbl_Issuance where I_Type='Return'  
  7. )  
  8.   
  9. select Iss - Ret1  as difference  
 
 
 

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (6)