AnsweredAssumed Answered

Two conditions in a case statement?

Question asked by Kirk_1 on Aug 21, 2012
Latest reply on Aug 21, 2012 by philmodjunk

Title

Two conditions in a case statement?

Post

Im searching a data base. When i do a search, I need the result i put into the Froniter_Mars::CF_02 field to be one of the following l5c, 5c, 1m, 2m, 5m, or 10m depending on the $weight.

The way i have it written, the result i get is  a 0 in the CF_02 field.

$Weight is 1700, the result i want to put into CF_2 is 1M.

What am i doing wrong? Is it having two conditions in the case?

If it is how can i write it to get the l5c, or the 5c or the 1m...?

 

Let ( w =$weight ;

Case ( w < 500 ; Fontier_Mars::CF_02 = "L5C" ;
           w < 1000 ;  Fontier_Mars::CF_02 = "5C" ;
           w < 2000 ; Fontier_Mars::CF_02 = "1M" ;
           w < 5000 ; Fontier_Mars::CF_02 = "2M" ;
           w < 10000 ; Fontier_Mars::CF_02 = "5M"  ;
           w < 20000 ; Fontier_Mars::CF_02 = "10M" ;
)
)

Outcomes