"Mahefa Randimbisoa\\DS-ETU" <[EMAIL PROTECTED]> wrote:
> You should know the meaning of next SQL statements :
>
> SELECT DECODE(field_name, '0', 'Sunday', '1', 'Monday', '2', 'Tuesday')
> FROM table_name
>
> (This should mean : if field_name = '0', return 'Sunday', if field_name =
> '1', returns 'Monday', ...)
>
> I try to use this with mysql (in EasyPHP: Apache + MySQL + PHP on Win32),
> but mysql returns error at the third parameter. It expected to use the
> DECODE decryption function which needs only 2 parameters.
>
> How can I perform this trigger without using another table?
If you want to store correspondence between weekday and number in the database, you
should create table.
>From version 5.0 you can create your own function:
http://www.mysql.com/doc/en/Stored_Procedures.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]