Re: SQL (Select Case)
- From: bret@xxxxxxxxxx
- Date: 18 Jan 2007 08:57:21 -0800
hossnihendy@xxxxxxx wrote:
i would like to replace a column with another column in SQL with a
certain condition. For example:
if i do have an 3 table involved, one has amount, second has column A
and third has column B
I want to say if the amount is > (decimal) use column A instead of
cloumn B or the other way around.
Thanks.
Seems to me you already know the answer? Use the TSQL CASE statement.
The ASE documentation is at
http://sybooks.sybase.com/nav/summary.do?prod=9938&lang=en&prodName=Adaptive+Server+Enterprise&archive=0&Submit.x=14&Submit.y=8
-bret
.
- References:
- SQL (Select Case)
- From: hossnihendy
- SQL (Select Case)
- Prev by Date: Re: Number of rows returned
- Next by Date: Re: How to check the freespace for a disk device ?
- Previous by thread: SQL (Select Case)
- Next by thread: Number of rows returned
- Index(es):