At 04:25 PM 7/19/2005, you wrote:
>Are you table-scoping the column in your SELECT clause?  Perhaps you
>could post the whole SQL statement?


Mmmm...not sure I'm familiar with "table scoping"... (maybe you could 
elaborate on that)

The SQL itself is straightforward, it is just 3 fields in 3 different 
tables. Depending on the value of the first table, the contents of either 
the second table or the third one should be displayed:

SELECT A.status, B.content, C.content
FROM A, B, C
WHERE A.status=B.status OR A.status=C.status

The result I expected was that B.content would be displayed if the first 
condition was true (i.e., A.status=B.status), and C.content would be 
displayed if the second condition was true (i.e., A.status=C.status), 
considering that B.status and C.status couldn't be true at the same time as 
per business rules enforced at data entry.

I'll investigate the CASE solution suggested by Taco and see if that does 
the trick...

Thanks,

Roberto




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212278
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to