Re: Comparison in SQL
Chris Sol <[email protected]> Mon, 3 Mar 2003 14:43:18 -0000
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Message-ID | <LYRIS-1796914-895698-2003.03.03-14.38.36--gcdod-oracle#[email protected]> |
Thank Your solution works very well CHRIS > -----Original Message----- > From: [email protected] [SMTP:[email protected]] > Sent: 03 March 2003 14:00 > To: Oracle > Subject: [oracle] Re: Comparison in SQL > > > 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 > > <[email protected] To: "Oracle" > <[email protected]> > 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 %%email.unsub%%. > **************************************************************************** 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 protected].