if you're talking about in a select statement then
select decode(sign(a-b),-1,a,b) from ......
i may have things the wrong way around but you should get the drift
Regards
Chris Farmer
Chris Sol
<chris.sol@xxxxxx To: "Oracle"
<oracle@xxxxxxxxxxxx>
g.uk> cc:
Subject: [oracle] Comparison in
SQL
03/03/2003 13:56
Please respond to
"Oracle"
Hi
Anybody know what the best way to achieve the following
If field_ a > field_b then x= 'A' else x='B'
Chris Sol
Analyst Programmer
IT Development
Genesis Housing Group
Telephone 02085374169
****************************************************************************
The Genesis Housing Group - Email Disclaimer
--------------------------------------------
The information in this email and any attachments is strictly
confidential and may be legally privileged.
It is intended solely for the use of the addressee(s) only. Access to
this email by anyone else is unauthorised. If you have received this
email in error please notify the sender immediately by return email or
telephone. Please note that if you are not the intended recipient, you
must not copy, distribute or otherwise act on any part of this email or
it's attachments.
Although we have taken precautions to ensure that this email and
attachments are free from any virus, we would advise you that it is your
responsibility to ensure that this is true when reading or actioning
this email.
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to %%email.unsub%%.
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to leave-oracle-1796914O@xxxxxxxxxxxxx
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|