>hi
>
>does mysql support any equivalent of DECODE in oracle?
>i have been looking all over for info on this, but
>cannot find any. i have several SQL scripts in our
>code that use the decode stmt, and now that some of
>our stuff is being ported to MySQL, i have hit a wall.
>
>
>will i have to get my perl to do the looping and then
>display the results? i want something as follows:
>
>
> Quantity Sold for week beginning 5 Feb
>
> 05/02 06/02 07/02 08/02 09/02
>
>product 1 22 90 78 12 09
>product 2 22 78 12 34 10
>product 3 10 12 12 23 23
>
>this is simply done with DECODE in oracle, but what to
>do in mysql? would appreciate any help/advice!
>
>thanks/erick
Sir, MySQL has both the If function, and the CASE IF THEN ELSE
structure. Check the online documentation.
I know what decode() is, but I have very little experience with
Oracle and I can't figure out how you used decode() to arrive at the
output above, so I can't offer any more help.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php