Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hzx
Starting Member
3 Posts |
Posted - 2007-08-29 : 11:57:00
|
| Can I use IF ELSE on join table statement? Going to be like thisselect * from PACKING p left outer join REJECT r on (IF p.F_QUALITY IS NULL p.REJECT_ID ELSE p.F_REJECT_ID)=r.REJECT_IDI try to use it to query DB, no luck.Thanks in advance |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2007-08-29 : 11:58:28
|
| Have a look at CASE statements in T-SQL. |
 |
|
|
|
|
|