By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

Uregent... problem in SQL query

P: n/a
K k
Hi,

I have created 2 tables tbl1 and tbl2 and added data as follows
tbl1:

account_desc accountno acc_name acc_address account_type
acc1 111 name1 add1 ty01
acc2 222 name2 add2 ty01
acc3 333 name3 add3 ty02
acc4 444 name4 add4 ty01
acc5 555 name5 add5 ty02

tbl2:

account_desc accountno
acc1 111
acc2 222
acc3 333
acc4 444
acc5 555

and trying to execute the right outer jon query

select a.* FROM tbl1 a right outer join tbl2 b on a.account_desc =
b.account_desc where a.account_type='TY01'

It is displayed the values

account_desc accountno acc_name acc_address account_type
acc1 111 name1 add1 ty01
acc2 222 name2 add2 ty01
acc4 444 name4 add4 ty01

But, In my application, I want out put similar to the below

account_desc accountno acc_name acc_address account_type
acc1 111 name1 add1 ty01
acc2 222 name2 add2 ty01
acc3
acc4 444 name4 add4 ty01
acc5

Please help me how can we achieve the above result from the SQL
statement.

Regards.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.