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 |
|
Swatig
Starting Member
7 Posts |
Posted - 2008-07-14 : 13:51:02
|
| Hi I am working on query where need to get results from 2 tables.The query I am using is this :select m.user_name,p.photo from user_master m,user_profiles pwhere m.user_id in(select user_id from user_profiles p where full_name in(select full_name from user_profiles where date_of_birth in(select date_of_birth from user_profiles where date_of_birth in(select date_of_birth from user_profiles p whereuser_name in(select user_name from user_masterwhere user_name like 's%')))));if I run this querry seperately this will workathor wiseits shows 0 row fetchhow can I use union in this querry? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-14 : 14:00:17
|
is this what you want?select m.user_name,p.photo from user_master mjoin user_profiles pon p.user_id=m.user_idjoin user_master m1on m1.user_name=p.user_namewhere m1.user_name like 's%' |
 |
|
|
|
|
|