|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
|
|
#3
|
|||
|
|||
|
I don't see how to do the
IF Then Clause in SQL |
|
#4
|
||||
|
||||
|
you want CASE for that
select case when sex='1' then 'male' else 'female' end |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > General direction to look? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|