moving data from two tables to single table

db2 sql interview questions

Moderator: Moderator Group

Post Reply
sravand
Member
Posts: 3
Joined: Tue Apr 26, 2011 8:13 pm

moving data from two tables to single table

Post by sravand » Wed Jul 06, 2011 2:27 pm

Actually,
we have two tables(some data is there in this 2 tables) now i have to merge these 2 tables and move to another table using cobol how u do these one ? r else tell me how v do in db2
and these is my interview question recently
sravan

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Thu Jul 07, 2011 5:50 pm

Well, FETCH the rows from the given two tables and INSERT in to the other!
Regards,
Anuj

User avatar
MJ
Member
Posts: 15
Joined: Thu Jul 21, 2011 9:29 am

Post by MJ » Thu Jul 21, 2011 1:41 pm

how about using JOINS? can it serve the purpose Anuj?
--------
# MJ #
--------

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Thu Jul 21, 2011 7:12 pm

Yeah, it can but the real answer is - it depends on what exactly the OP is looking for.
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others