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

Problem with Partitioning the Table.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Mon May 18, 2009 4:14 pm
Reply with quote

Hi,
I tried to Partition my table as below

CREATE TABLE
.
.
PARTITION BY (MY_DT ASC
,MY_NUM ASC )
(PARTITION 1 ENDING AT(9999,'2009-01-15')
,PARTITION 2 ENDING AT(9999,'2009-01-31')
,PARTITION 3 ENDING AT(9999,'2009-02-28')
,PARTITION 4 ENDING AT(9999,'2009-03-31')
,PARTITION 5 ENDING AT(9999,'2009-04-30')
,PARTITION 6 ENDING AT(9999,'2009-05-31')
)

I tried to load a data which spans through all the the 5 months and then tried running the REORG on the table.
When I checked number of records in each partition, to my suprise I found all the records loaded only in the first partition.

On the contrary I created the table as
CREATE TABLE
.
.
PARTITION BY (MY_NUM ASC
,MY_DT ASC )
(PARTITION 1 ENDING AT('2009-01-15',9999)
,PARTITION 2 ENDING AT('2009-01-31',9999)
,PARTITION 3 ENDING AT('2009-02-28',9999)
,PARTITION 4 ENDING AT('2009-03-31',9999)
,PARTITION 5 ENDING AT('2009-04-30',9999)
,PARTITION 6 ENDING AT('2009-05-31',9999)
)

When I tried loading the data which spans across all the 5 months to this table, the data based on the Partition boundar got loaded to the corresponding partition.

Can somebody please point why DB2 does this??
Back to top
View user's profile Send private message
vinit_infy
Warnings : 1

New User


Joined: 07 Apr 2005
Posts: 56

PostPosted: Tue May 19, 2009 10:44 am
Reply with quote

Probably your MY_DT field is defined as X(10) and not as a DATE field.
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Tue May 19, 2009 12:27 pm
Reply with quote

Its Declared as DATE only and not X(10).
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top