Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How many nested Queries at maximum can a Select statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
nagalakshmi

New User


Joined: 23 Feb 2005
Posts: 7

PostPosted: Thu Feb 24, 2005 9:20 pm    Post subject: How many nested Queries at maximum can a Select statement
Reply with quote

Hi,

Please Clarify questions being asked for interview :

1. How many nested Queries at maximum can a Select statement can have?

2. How many Maximum no. of columns can a DB2 table can have?

Thanks
Lakshmi
Back to top
View user's profile Send private message

mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Thu Feb 24, 2005 9:49 pm    Post subject: Re
Reply with quote

Hi,

Please check this link:

http://ibmmainframes.com/references.php

Click on: DB2-SQL PROGRAMMING LIMITS under References: DataBases
section.
Back to top
View user's profile Send private message
khannay2k

New User


Joined: 24 Feb 2005
Posts: 28
Location: Bangalore

PostPosted: Fri Feb 25, 2005 12:38 pm    Post subject:
Reply with quote

Hi Nagalakshmi,

1. How many nested Queries at maximum can a Select statement can have?

At the max you can have 15 nested queries, and total of 16 queries in a select statment.

2. How many Maximum no. of columns can a DB2 table can have?

For this i have mentioned that u can have at the max 224 columns during the earlier posts. go through the posts, and see that you are not repeating the queries.

Khanna.
Back to top
View user's profile Send private message
Rajshekhar V Patil

New User


Joined: 23 Feb 2005
Posts: 7
Location: Mumbai

PostPosted: Tue Mar 01, 2005 4:57 pm    Post subject: Hi
Reply with quote

2. How many Maximum no. of columns can a DB2 table can have?
A.

Maximum no. of columns can a DB2 table is 750.

When VSAM to DB2 conversion that time max. is 255(migrating the file into DB2 tables)
Back to top
View user's profile Send private message
pradeepsamson

New User


Joined: 08 Mar 2005
Posts: 5
Location: Pune

PostPosted: Wed Jun 14, 2006 4:40 pm    Post subject: Few questions
Reply with quote

Hi,

1) In JCL sort card sum fields = none for eliminating duplicates. How can I retrieve only duplicates?
2) How will you make sure that your SELECT query retrieves only one row always?
3) DISTINCT is used for eliminating duplicate rows in DB2. How can retrieve all the duplicates (A sample query is highly appreciated)?
4) I have a sort requirement like 5 records. In that 4 are same and 1 is different. I want to get only that 1 record. How? Anyone have an idea about "EQUALS" in sort card?
5) What would be your first approach after getting -805?
6) How can I know my particular program is using particular "PLAN"?
8)I have written program, ?PROGRAM-ID. ADD. Saved this particular program in a PDS as member name TEST. Will it work or throw any error?
9) I am compiling a COBOL db2 program suddenly my Db2 brought down what will happen?
10) What is Z-OS?

Cheers!
Pradeep Samson.
Back to top
View user's profile Send private message
harish_mf

New User


Joined: 31 Jul 2005
Posts: 18
Location: bangalore

PostPosted: Thu Jul 20, 2006 1:08 pm    Post subject: Re: Few questions
Reply with quote

pradeepsamson wrote:
Hi,

1) In JCL sort card sum fields = none for eliminating duplicates. How can I retrieve only duplicates?
2) How will you make sure that your SELECT query retrieves only one row always?
3) DISTINCT is used for eliminating duplicate rows in DB2. How can retrieve all the duplicates (A sample query is highly appreciated)?
4) I have a sort requirement like 5 records. In that 4 are same and 1 is different. I want to get only that 1 record. How? Anyone have an idea about "EQUALS" in sort card?
5) What would be your first approach after getting -805?
6) How can I know my particular program is using particular "PLAN"?
8)I have written program, ?PROGRAM-ID. ADD. Saved this particular program in a PDS as member name TEST. Will it work or throw any error?
9) I am compiling a COBOL db2 program suddenly my Db2 brought down what will happen?
10) What is Z-OS?

Cheers!
Pradeep Samson.
Back to top
View user's profile Send private message
harish_mf

New User


Joined: 31 Jul 2005
Posts: 18
Location: bangalore

PostPosted: Thu Jul 20, 2006 1:12 pm    Post subject: Re: Few questions
Reply with quote

harish_mf wrote:
pradeepsamson wrote:
Hi,

1) In JCL sort card sum fields = none for eliminating duplicates. How can I retrieve only duplicates?
:- sum fields=none, xsum
2) How will you make sure that your SELECT query retrieves only one row always?
:- by if not it will give -811(when cursor is not declared).

3) DISTINCT is used for eliminating duplicate rows in DB2. How can retrieve all the duplicates (A sample query is highly appreciated)?
:-n use Where Exits and Count(*)
4) I have a sort requirement like 5 records. In that 4 are same and 1 is different. I want to get only that 1 record. How? Anyone have an idea about "EQUALS" in sort card?
:- Thia I have to try.
5) What would be your first approach after getting -805?
:- Rebinding is widely used.
6) How can I know my particular program is using particular "PLAN"?
:- Plan is selected through its indexes.
8)I have written program, ?PROGRAM-ID. ADD. Saved this particular program in a PDS as member name TEST. Will it work or throw any error?

:- It will work.
9) I am compiling a COBOL db2 program suddenly my Db2 brought down what will happen?
:-For pre compiling no matter Db2 is up r down.
10) What is Z-OS?
:Zseries os , advanced with release 13 and 14.

Cheers!
Pradeep Samson.
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Fri Aug 11, 2006 1:16 pm    Post subject:
Reply with quote

Hi pradeepsamson and harish_mf,

can you guys please avoid cramming a lots of irrelevent questions from the post?

if you wish, you guys can open a new topic after searching the forum.
Back to top
View user's profile Send private message
saravanant
Currently Banned

New User


Joined: 06 Sep 2006
Posts: 6
Location: chennai

PostPosted: Sat Sep 09, 2006 6:46 pm    Post subject: Re: How many nested Queries at maximum can a Select statemen
Reply with quote

nagalakshmi wrote:
Hi,

Please Clarify questions being asked for interview :

1. How many nested Queries at maximum can a Select statement can have?

2. How many Maximum no. of columns can a DB2 table can have?

Max no.of columns in a table is 242

Thanks
Lakshmi
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Need help with below queries ashek15 DB2 3 Thu Mar 23, 2017 1:38 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us