SQL Query Help
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