MySQL Forums
Forum List  »  InnoDB

Re: Using the compared value
Posted by: Stephen Barton
Date: October 01, 2008 12:35AM

OK, I think I found a good solution to this, suggested by a colleague. Basically his suggestion was to move where the IF function is placed.
From here:
IF(
(SELECT....
..........
..........) < 0, 'N/A', (SELECT....
..........
..........)
)
to here:
(SELECT IF( value< 0, 'N/A', value)
..........
..........
..........
..........)

I knew my first thought was wrong, but I think this is the answer. Thanks for your suggestions.

Stephen

Options: ReplyQuote


Subject
Views
Written By
Posted
2671
September 30, 2008 05:54AM
1932
September 30, 2008 08:23AM
1881
September 30, 2008 08:23AM
Re: Using the compared value
1867
October 01, 2008 12:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.