Try to use 'concat()' function.
if ('stop' <'start', stop, concat(stop,'+++'))
Best regards,
Mikhail.
----- Original Message -----
From: "Fabrizio Tivano" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003 13:07
Subject: possible query?
>
> hello dear all,
>
> i need to make a select on mysql with IF funcion:
>
> if ('stop' <'start', stop, '+++')
>
> where start and stop are timestamps.
> and [+++] is an error char.
>
>
> Actually my select result are:
>
>
> +----------+--------+
> | data | start | stop |
> +----------+-------+--------+
> | 20030301 | 74621 | +++ |
> | 20030302 | 74840 | 181211 |
>
>
> but i have a question:
>
> Is possible, and if yes how,
> to make so that query generate a result like:
>
>
> +----------+--------+
> | data | start | stop |
> +----------+-------+--------+
> | 20030301 | 74621 |0020 +++ |
> | 20030302 | 74840 | 181211 |
>
> where: if the stop time is < (less than) start time
> i can print stop time and error char together.
>
>
>
> Thanks in advance !
>
> fabrizio
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]