Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Query Help

SeshuGiriJul 12 2007 — edited Jul 12 2007
Hi,

I have 2 tables (AccountOne, AccountTwo)
Both have SAME structure, but data is different

AccountOne
Account Code Amount
11111 AAA 100.00
22222 AAA 200.00
33333 BBB 232.23
11111 CCC 121.10
AccountOne has data with Code = (AAA,BBB,CCC)

AccountTwo
Account Code Amount
11111 XYX 100.00
22222 XXY 200.00
33333 XBA 232.23
11111 CCC 121.10

AccountTwo has data with all[b] other than Code = (AAA,BBB,CCC)

How to do?

Output wanted (assuming I am passing 11111 as input to SQL)
11111 AAA 100.00
11111 CCC 121.10
11111 XYX 100.00
11111 CCC 121.10

Is there anyway I can use DECODE for this???

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2007
Added on Jul 12 2007
7 comments
288 views