View previous topic :: View next topic |
Author |
Message |
puneet kumar Beginner
Joined: 07 Dec 2002 Posts: 5 Topics: 2
|
Posted: Sun Jan 12, 2003 4:40 am Post subject: Download records from different partitions of the table |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Sun Jan 12, 2003 10:23 am Post subject: |
|
|
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 |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Mon Jan 13, 2003 1:55 am Post subject: |
|
|
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 |
|
|
|
|