MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Download records from different partitions of the table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
puneet kumar
Beginner


Joined: 07 Dec 2002
Posts: 5
Topics: 2

PostPosted: Sun Jan 12, 2003 4:40 am    Post subject: Download records from different partitions of the table Reply with quote

Hi All,

I want to use DSNTIAUL program to download the records from the specific partitions of the table , when i give the syntax like

SELECT * FROM
TABLE NAME
WHERE COND = 1
PART 01,02;

It is giving error. Could someone please correct the syntax.

Thanks & Regards,
PK
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12359
Topics: 75
Location: San Jose

PostPosted: Sun Jan 12, 2003 10:23 am    Post subject: Reply with quote

Puneet,

If you have platinum tools then you can specify the specific partion using the following query.
Code:

SELECT * FROM TABLENAME PART 1;


But unload utilities access data in a different way to normal DB2 SQL.You need to get the LIMITKEY from SYSIBM.SYSINDEXPART and use it to unload the partition.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Mon Jan 13, 2003 1:55 am    Post subject: Reply with quote

Hi,

If you know the value of the column which is used as the partitioning index, you can very well use it in the WHERE clause of your query. The query will runlike a simple query but will use the partitioning index and select all the records of the two partitions whose values you have used in the WHERE clause.

Something like the following -

Code:

SELECT * FROM TAB1 WHERE Column Name which is used as the partitioning index = 'value of the column for the first parition';


Regards,
Manas
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group