March 1st, 2003, 12:40 PM
General direction to look?
How do I used SQL how do I do the compare logic for a request like this?
Select some stuff from 2 differant tables
If table1.Status == 1 list the stuff from some other tables
If table2. Status ==1 list the stuff from table 1
What is this kind of stuff called in SQL? Can I do this sortof logic in a stored procedure? or my usual C++/ODBC?
Thanks in advance.
March 1st, 2003, 06:41 PM
March 2nd, 2003, 10:25 AM
I don't see how to do the
Then Clause in SQL
March 2nd, 2003, 12:56 PM
you want CASE for that
select case when sex='1' then 'male' else 'female' end