Quantcast
Channel: SCN : Unanswered Discussions - Semantic Layer
Viewing all articles
Browse latest Browse all 1291

Problem with Case when null

$
0
0

Hi Experts,

 

My requirement is as below this condition I am using in derived table but not able to parse because of some times it is showing

<<< Encountered "IS" at line 8, column 39.

Was expecting one of:

    "then" ...

    "and" ...

    "or" ...

>>>

 

If I Use "IF NULL" in same code instead of "IS NULL"  Then getting below error

 

<<<<<<<Encountered "IN" at line 9, column 54.

Was expecting one of:

    "when" ...

    "else" ...

    "end" ...

    "+" ...

    "-" ...

    "*" ...

    "/" ...

    "**" ...

    "//" ...

    "%" ...

    "." ...

>>>>>

This below mentioned euwry i am using

 

Select

Max(Table__1."0PSTNG_DATE") As Date

 

 

  From  @catalog('NM1')."PUBLIC"."IZDSO_DMR"  Table__1

  Where

   CASE When

    Table__1."0MOVETYPE" IN (601,602) IS NULL

   THEN

    Table__1."0MOVETYPE" IN (201,202,261,262)

  When

    Table__1."0MOVETYPE" IN (201,202,261,262) IS NULL

  THEN

  Table__1."0MOVETYPE" IN (101,102,131, 132 )

  When

  Table__1."0MOVETYPE" IN (101,102,131,132 ) IS NULL

  THEN

  Table__1."0MOVETYPE" IN (501,502 )

  ELSE

  Table__1."0MOVETYPE" IN (601,602)

  END  .

 

Please correct the query,

 

 

Thanks,

G Sampath Kumar


Viewing all articles
Browse latest Browse all 1291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>