List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 4 2002 12:46am
Subject:Re: Can you do something like this in Mysql?
View as plain text  
At 17:36 -0700 1/3/02, Mat Murdock wrote:
>Can you do something like this in Mysql?  The following lines are part of a
>much larger sql query that we use on a MSsql box.

MySQL has had CASE since earlier 3.23.x releases.

>
>...
>case ar_open_items.doc_code
>when 'I' then 'Invoice'
>when 'C' then 'Credit Memo'
>when 'D' then 'Debit Memo'
>when 'F' then 'Finance Chg'
>when 'O' then
>case ar_open_items.is_deposit
>when 'Y' then 'Deposit'
>when 'N' then 'On-Account'
>else 'D-Logic Error'
>end
>else 'Data Error'
>end as DOC_TYPE,
>...
>
>Thanks,
>
>Mat

Thread
Can you do something like this in Mysql?Mat Murdock4 Jan
  • Re: Can you do something like this in Mysql?Paul DuBois4 Jan