IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How many nested Queries at maximum can a Select statement


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 1210
Location: India

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

Hi,

Please check this link:

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
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
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Dynamically pass table name to a sele... DB2 2
No new posts SELECT from data change table DB2 5
No new posts Select two different counts from SQL... DB2 6
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top