Hi,
Oracle has a fuction that compares value and then returns another value.
DECODE( expr, search, result [, search, result] ... [, default] )
E.g.
DECODE (deptno, 10, 'ACCOUNTING',
20, 'RESEARCH',
30, 'SALES',
40, 'OPERATION',
'NONE')
If 'deptno' is equal to 10 the string 'ACCOUNTING' is returned, 20 =>
'RESEARCH'....etc. If no match 'NONE' will be returned.
Is there some similar function in mySQL?
Best regards
Joacim
---------------------------------------------------------------------
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