Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem with Partitioning the Table.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Mon May 18, 2009 4:14 pm    Post subject: Problem with Partitioning the Table.
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    Post subject:
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: 85
Location: Bangalore

PostPosted: Tue May 19, 2009 12:27 pm    Post subject: Reply to: Problem with Partitioning the Table.
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us