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 |
|
rameshgoudd
Starting Member
13 Posts |
Posted - 2007-12-13 : 06:10:28
|
| hi,i have a database table,in that three fields are there..id, status, rejectionid1 approved (null)2 rejected 2 (i have 3reasons(id s are 1 to 3)in othertable)in the othertable means..rejection tablerejectionid cause1 bad2 speeling mistakes3 otheri need the o/p like thisid status cause1 accpted (null)2 rejectd speeling mistakesthe cause is null for the status approved onceand it has the some value for the status rejectedhow can i write the query for this |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-12-13 : 06:13:13
|
| [code]Select t1.id, t1.status, t2.causefrom t1 left join t2 on t1.rejectionid = t2.rejectionid[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-13 : 06:13:32
|
[code]select t1.id, t1.status, t2.causefrom table1 t1 left join table2 t2 on t1.rejectionid = t2.rejectionid[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-13 : 06:13:53
|
by 9 secs KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-12-13 : 06:16:53
|
It shouwed 0 replies in the active topic but when I open, I see three replies.You are all faster MadhivananFailing to plan is Planning to fail |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-13 : 06:21:40
|
I set to "reload page every minute"  KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|