> SELECT
> CASE WHEN status IN('BR', 'VQ', 'RQ', 'NG' )
> THEN
> 'binding'
> CASE WHEN status IN('NA', 'NG', 'RA')
> END as action
> FROM master_info WHERE
> (( status IN ( 'BR', 'VQ', 'RQ', 'NG' )) OR
> ( status IN ( 'NA', 'NG', 'RA' )));

Sadly, that didn't work:

Your MySQL connection id is 208517 to server version: 4.0.14-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SELECT
    -> CASE WHEN status IN('BR', 'VQ', 'RQ', 'NG' )
    -> THEN
    -> 'binding'
    -> CASE WHEN status IN('NA', 'NG', 'RA')
    -> END as action
    -> FROM master_info WHERE
    -> (( status IN ( 'BR', 'VQ', 'RQ', 'NG' )) OR
    -> ( status IN ( 'NA', 'NG', 'RA' )));
ERROR 1064: You have an error in your SQL syntax.  Check the manual that 
corresponds to your MySQL server version for the right syntax to use near 'CASE 
WHEN status IN('NA', 'NG', 'RA') END as action FROM master

Do you have something similar that works?  What does it look like?

Chris


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to