Home » SQL & PL/SQL » SQL & PL/SQL » Union??? or Merge of tables
Union??? or Merge of tables [message #611172] Fri, 28 March 2014 14:48 Go to next message
ertweety11
Messages: 9
Registered: March 2014
Junior Member
I have two tables of data that I want to merge together.

Table 1 (DESKTOP TABLE)
DT KEYCODES TL_DESKTOP TL_DIST
3/1/2014 CL Decrease, No Reversal-Stmt Message 1 1
3/1/2014 CL Decrease, Reversal-Letter 3 3
3/1/2014 CL Decrease, Reversal-Stmt Message 37 32

Table 2 (IVR TABLE)
DT KEYCODES TL_IVR TL_DIST_ACCTS
3/1/2014 CL Decrease, Reversal-Letter 4 3
3/1/2014 CL Decrease, Reversal-Stmt Message 56 56


Basically I would like the new table to display as follows;

DT KEYCODES TL_DESKTOP TL_DIST TL_IVR TL_DIST_ACCTS
3/1/2014 CL Decrease, No Reversal-Stmt Message 1 1 0 0
3/1/2014 CL Decrease, Reversal-Letter 3 3 4 3
3/1/2014 CL Decrease, Reversal-Stmt Message 37 32 56 56
Re: Union??? or Merge of tables [message #611173 is a reply to message #611172] Fri, 28 March 2014 14:53 Go to previous messageGo to next message
John Watson
Messages: 8928
Registered: January 2010
Location: Global Village
Senior Member
You have already been asked to read our OraFAQ Forum Guide and to read How to use [code] tags and make your code easier to read
You have also been asked to provide a test case: CREATE TABLE and INSERT statements.



Re: Union??? or Merge of tables [message #611174 is a reply to message #611173] Fri, 28 March 2014 15:02 Go to previous messageGo to next message
ertweety11
Messages: 9
Registered: March 2014
Junior Member
I'll delete this post if I can figure out how to.
Re: Union??? or Merge of tables [message #611175 is a reply to message #611174] Fri, 28 March 2014 15:43 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
ertweety11 wrote on Fri, 28 March 2014 13:02
I'll delete this post if I can figure out how to.


The answer is contained in the Posting Guidelines
Previous Topic: how to use substr if the error ORA-01403: no data found.
Next Topic: How to handle error in 5th counting on cursor
Goto Forum:
  


Current Time: Tue Apr 16 08:08:34 CDT 2024