Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us