Help with Conditional Select

db2 sql interview questions

Moderator: Moderator Group

Post Reply
Mark II
Member
Posts: 1
Joined: Sun Aug 17, 2014 7:23 pm

Help with Conditional Select

Post by Mark II » Sun Aug 17, 2014 7:42 pm

Hi All

My first post in this forum, I apologize before hand in case I offend anyone for not following forum rules. This is one of the questions I may be asked in an upcoming interview , any help would be appreciated

1)Generate SQL query that will provide records where account id matches, but if account id does not match, then check for match of cost center id, then check for match of company id

Table name:
Accounts Raw

Columns:
Account ID
Account Cost Center ID
Account Company ID

Table name:
Accounts Target

Columns:
Account ID
Account Cost Center ID
Account Company ID

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