Skip to Content
0
May 17, 2022 at 08:02 AM

SQLSCRIPT: sql syntax error: incorrect syntax near "AS"

2812 Views Last edit Jun 30, 2022 at 10:58 AM 4 rev

Hi 
CASE WHEN (inTab."/BIC/C55CONTID" is NOT null) 
               THEN      
               CASE WHEN (inTab."/BIC/CRCBECFVN" >1 ) THEN
                    (SELECT "/BIC/K5SCDCEC" FROM "/BIC/AZD_TVOG2"  WHERE "/BIC/AZD_TVOG2"."/BIC/CRCBECFVN" = 1) AS "/BIC/K5SCDCEC",
                 ELSE 
                   "/BIC/K5SCDCEC" AS "/BIC/K5SCDCEC"
                   END
				   END

after writing this logic gives me an error on the AS, can you tell me the reason?

image.png

Attachments

image.png (13.0 kB)
image.png (21.6 kB)