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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am


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