Alter table partition based on date and status

Hi!
I have a strange scenario where in 100,000 to 500,000 records are created every day and records are to be maintained for 3 yrs. So to manage this table we have it partitioned based on date (so every day one new partition is created). And any partition older than 3 years are to be purged. But the catch is - the table has a 'Creation_date' and 'Close_date' parameter and as per my company's rule, I can only purge the 3 yr old data based on the 'Closed_date'. Basically we end up getting some entries with 'Close_date' that don't fall in the 3+ yr category and hence we just cannot purge the whole partition and reclaim the space.
What would be the ideal way to partition this table to make easy maintenance!?
eg -
Table_1: Partition_03152006
Col-1 Creation-date Col-2 Close-date
AAAA 03/15/2006 BBBB 03/16/2006 I can drop this entry+
XXXX 03/15/2006 YYYY 05/20/2006 I cannot drop this entry+
So, I am left with non-empty partitions which I cannot purge completely. Right now, I am moving these remaining entries to another partition and purging them when they complete the 3+yr time period.
Hope I could put in my query properly.
NOTE: RDBMS - ORACLE 10.2.0.4 on Solaris/SPARC 64Bit
Thanks in advance,
Arindam
Edited by: AB007 on Jun 19, 2009 1:15 PM

Hi! Below is the table description and the first 5 entries of the table.
Hi,
Thanks for your help. Below is the table structure with the index associated with it -
CREATE TABLE "T3TKTHEADER"
( "TKTNUM" VARCHAR2(13) NOT NULL ENABLE,
"ALTTKTNUM" VARCHAR2(20),
"CREATEDTTM" DATE,
"CREATEUSERID" NUMBER,
"CREATEWKGRPID" NUMBER,
"MASTERTKTNUM" VARCHAR2(13),
"CUSID" VARCHAR2(15),
"CUSNAME" VARCHAR2(80),
"CUSCNCTNAME" VARCHAR2(80),
"CUSCNCTPHN" VARCHAR2(22),
"ALTCUSCNCTNAME" VARCHAR2(80),
"ALTCUSCNCTPHN" VARCHAR2(22),
"PRTY" VARCHAR2(1),
"SVRITY" VARCHAR2(10),
"CURACTSEQNUM" NUMBER(*,0),
"LASTSTASTSCHANGETM" DATE,
"ACKNOWLEDGEFLAG" VARCHAR2(1),
"TMGRP" NUMBER,
"TOPGRP" NUMBER,
"TMUSER" NUMBER,
"TOPUSER" NUMBER,
"RECENTTKTSCOUNT" NUMBER,
"PRINEID" VARCHAR2(53),
"PRINEIDSVCTYPE" VARCHAR2(128),
"PRINEIDDETDTTM" DATE,
"PRINEIDLOCACITY" VARCHAR2(3),
"PRINEIDLOCASTATE" VARCHAR2(21),
"PRINEIDLOCZCITY" VARCHAR2(3),
"PRINEIDLOCZSTATE" VARCHAR2(21),
"TKTTYPE" VARCHAR2(10),
"DOMAIN" VARCHAR2(10),
"PRODTYPE" VARCHAR2(10),
"SYMCODE" VARCHAR2(10),
"SYMCODEDESC" VARCHAR2(50),
"RPTSRC" VARCHAR2(10),
"TOTALTKTTM" NUMBER,
"SHELLTKTTM" NUMBER(*,0),
"OTGCLOCKON" VARCHAR2(1),
"OTGCLOCKSEQ" VARCHAR2(5),
"OTGTM" NUMBER,
"ORIGNEID" VARCHAR2(80),
"NADCODE" VARCHAR2(30),
"NADDTTM" DATE,
"NADCODEDESC" VARCHAR2(50),
"OTGCAUSE" VARCHAR2(50),
"RESLCODE" VARCHAR2(10),
"PLATFORM" VARCHAR2(30),
"CATEQUIP" VARCHAR2(30),
"RESOLVEDDT" DATE,
"CLOSEDDT" DATE,
"PROBSUMMARY" VARCHAR2(500),
"TOPGRPESCSTS" VARCHAR2(1),
"TOPGRPESCLEV" VARCHAR2(2),
"TOPGRPLASTESCTM" DATE,
"TMGRPESCSTS" VARCHAR2(1),
"TMGRPESCLEV" VARCHAR2(2),
"TMGRPLASTESCTM" DATE,
"FAIFLAG" VARCHAR2(1),
"MSIFLAG" VARCHAR2(1),
"CHRONICFLAG" VARCHAR2(1),
"SLAMTTR" NUMBER,
"TSPCODE" VARCHAR2(13),
"DEFERREDSTARTTM" DATE,
"TOTALDEFERREDDUR" NUMBER,
"CURSTA" VARCHAR2(10),
"CURSTS" VARCHAR2(10),
"STSCOMMENT" VARCHAR2(100),
"ACTIVEINTREFERRALS" NUMBER(*,0),
"ACTIVEEXTREFERRALS" NUMBER(*,0),
"NUMOFXREFS" NUMBER(*,0),
"LASTUPDDTTM" DATE,
"LASTUPDUSERID" NUMBER,
"CREATEUSERID_NAME" VARCHAR2(21),
"CREATEWKGRPID_NAME" VARCHAR2(21),
"TMGRP_NAME" VARCHAR2(21),
"TOPGRP_NAME" VARCHAR2(21),
"TMUSER_NAME" VARCHAR2(21),
"TOPUSER_NAME" VARCHAR2(21),
"RESLCODEDESC" VARCHAR2(50),
"RDB_INSERT_DATE" DATE,
"CUSCNCTHOMEPHN" VARCHAR2(22),
"CUSCNCTCELLPHN" VARCHAR2(21),
"CUSCNCTFAXNUM" VARCHAR2(22),
"CUSCNCTEMAIL" VARCHAR2(47),
"ALTCUSCNCTHOMEPHN" VARCHAR2(22),
"ALTCUSCNCTCELLPHN" VARCHAR2(21),
"ALTCUSCNCTFAXNUM" VARCHAR2(22),
"ALTCUSCNCTEMAIL" VARCHAR2(47),
"CUSCNCTALTPHN" VARCHAR2(22),
"ALTCUSCNCTALTPHN" VARCHAR2(22),
"CREATEUSERNAME" VARCHAR2(21),
"CREATEWKGRPNAME" VARCHAR2(21),
"TMGRPNAME" VARCHAR2(21),
"TOPGRPNAME" VARCHAR2(21),
"TMUSERNAME" VARCHAR2(21),
"TOPUSERNAME" VARCHAR2(21),
"LASTUPDUSERNAME" VARCHAR2(21),
"CURINTROGNAME" VARCHAR2(22),
"CURINTROUSERNAME" VARCHAR2(22),
"CURETTRID" NUMBER,
"CURLECNAME" VARCHAR2(21),
"CUREXTRODTTM" DATE,
"RESOLVEBYUSERNAME" VARCHAR2(21),
"RESOLVEBYWKGRPNAME" VARCHAR2(21),
"RESOLVEDBYUSERID" NUMBER,
"RESOLVEDBYWKGRP" NUMBER,
"NUMOFNEIDS" NUMBER,
"PRINEIDLOCACTYNAME" VARCHAR2(40),
"PRINEIDLOCZCTYNAME" VARCHAR2(40),
"SYMPTCAT" VARCHAR2(32),
"RECEIVEDVIA" VARCHAR2(32),
"RECENTAPPERRORCODE" VARCHAR2(10),
"CORPID" VARCHAR2(15),
"KEYWORDS" VARCHAR2(25),
"SLALEVEL" VARCHAR2(1),
"ROGSTSCOMMENT" VARCHAR2(100),
"TOGSTSCOMMENT" VARCHAR2(100),
"TMGSTSCOMMENT" VARCHAR2(100),
"CUSCNCTPAGER" VARCHAR2(47),
"ALTCUSCNCTPAGER" VARCHAR2(47),
"METANAMETBL" VARCHAR2(10),
"NEXTACTIONDTTM" DATE,
"TOPWKGRPSTATUS" VARCHAR2(10),
"INTGRPID" VARCHAR2(21),
"INTPUBFLAG" VARCHAR2(1),
"INTTKTNUM" VARCHAR2(30),
"BILLEVENTFLAG" VARCHAR2(1),
"WHN_OTGTM" NUMBER DEFAULT 0,
"ILEC_OTGTM" NUMBER DEFAULT 0,
"EVENTID" VARCHAR2(15),
"NUMCIRCUITS" NUMBER,
"TMASSIGNDTTM" DATE,
"TOPASSIGNDTTM" DATE,
"ALERTCUSFLAG" VARCHAR2(1),
"MCIPRODNAME" VARCHAR2(40),
"ALTNEID" VARCHAR2(53),
"CONTROLSITE" VARCHAR2(14),
"CRITICALINDICATOR" VARCHAR2(1),
"REPORTEDBYNAME" VARCHAR2(80),
"REPORTEDBYPHN" VARCHAR2(22),
"REPORTEDBYCELLPHN" VARCHAR2(21),
"REPORTEDBYEMAIL" VARCHAR2(47),
"REPORTEDBYFAXNUM" VARCHAR2(22),
"REPORTEDBYHOMEPHN" VARCHAR2(22),
"REPORTEDBYPAGER" VARCHAR2(47),
"REPORTEDBYALTPHN" VARCHAR2(22),
"DISPATCHIND" VARCHAR2(1),
"BILLCUSTNOTIFY" VARCHAR2(1) DEFAULT 0,
"ACCESSID" NUMBER DEFAULT 0 NOT NULL ENABLE,
"GARMLEVEL" VARCHAR2(10) DEFAULT 1 NOT NULL ENABLE,
"GARMID" VARCHAR2(100) DEFAULT ' ' NOT NULL ENABLE,
"GARMIDTYPE" VARCHAR2(50) DEFAULT ' ' NOT NULL ENABLE,
"T1AINDICATOR" VARCHAR2(15),
"TKTSOURCE" VARCHAR2(20),
"SOURCETEXT" VARCHAR2(40),
"RCOCIRCUITID" VARCHAR2(53),
"RCOTKTNUM" VARCHAR2(13)
) PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255 LOGGING
STORAGE(INITIAL 134217728 NEXT 134217728
BUFFER_POOL DEFAULT)
TABLESPACE "TS_MED1"
PARTITION BY RANGE ("TKTNUM")
(PARTITION "PART_OLD" VALUES LESS THAN ('2003080100001')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 134217728 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_OLD" NOCOMPRESS ,
PARTITION "PART04Q1" VALUES LESS THAN ('2004033199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 52428800 NEXT 52428800 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_04_OLD" NOCOMPRESS ,
PARTITION "PART04Q2" VALUES LESS THAN ('2004063099999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 52428800 NEXT 52428800 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_04_OLD" NOCOMPRESS ,
PARTITION "PART04Q3" VALUES LESS THAN ('2004093099999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 52428800 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_04_OLD" NOCOMPRESS ,
PARTITION "PART04Q4" VALUES LESS THAN ('2004123199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 52428800 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_04_OLD" NOCOMPRESS ,
PARTITION "PART05Q1Q2" VALUES LESS THAN ('2005063199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 20971520 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEADER_05Q1Q2" NOCOMPRESS ,
PARTITION "PART05Q3Q4" VALUES LESS THAN ('2005123199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 20971520 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_05Q3Q4" NOCOMPRESS ,
PARTITION "PART06Q1Q2" VALUES LESS THAN ('2006063199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 20971520 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_06Q1Q2" NOCOMPRESS ,
PARTITION "PART06Q3Q4" VALUES LESS THAN ('2006123199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_06Q3Q4" NOCOMPRESS ,
PARTITION "PART07Q1Q2" VALUES LESS THAN ('2007063199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_07Q1Q2" NOCOMPRESS ,
PARTITION "PART07Q3Q4" VALUES LESS THAN ('2007123199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_07Q3Q4" NOCOMPRESS ,
PARTITION "PART08Q1Q2" VALUES LESS THAN ('2008063199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_08Q1Q2" NOCOMPRESS ,
PARTITION "PART08Q3Q4" VALUES LESS THAN ('2008123199999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_08Q3Q4" NOCOMPRESS ,
PARTITION "PART09Q1Q2" VALUES LESS THAN ('2009063099999')
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_09Q1Q2" NOCOMPRESS ,
PARTITION "PART09Q3Q4" VALUES LESS THAN (MAXVALUE)
PCTFREE 20 PCTUSED 50 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_09Q3Q4" NOCOMPRESS )
CREATE INDEX "ETMS"."XTKTHDR9" ON "ETMS"."T3TKTHEADER" ("LASTUPDDTTM", "INTPUB
FLAG", "CURSTS")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "PART_OLD"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 5242880 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_TKTHEAD_OLD" ,
PARTITION "PART04Q1"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 20971520 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_04_OLD" ,
PARTITION "PART04Q2"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 20971520 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_04_OLD" ,
PARTITION "PART04Q3"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 20971520 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_04_OLD" ,
PARTITION "PART04Q4"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 20971520 NEXT 20971520 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_04_OLD" ,
PARTITION "PART05Q1Q2"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 10485760 NEXT 10485760 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEADER_05Q1Q2" ,
PARTITION "PART05Q3Q4"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 10485760 NEXT 10485760 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_05Q3Q4" ,
PARTITION "PART06Q1Q2"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 5242880 NEXT 5242880 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_06Q1Q2" ,
PARTITION "PART06Q3Q4"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_06Q3Q4" ,
PARTITION "PART07Q1Q2"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_07Q1Q2" ,
PARTITION "PART07Q3Q4"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_07Q3Q4" ,
PARTITION "PART08Q1Q2"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_08Q1Q2" ,
PARTITION "PART08Q3Q4"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_08Q3Q4" ,
PARTITION "PART09Q1Q2"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_09Q1Q2" ,
PARTITION "PART09Q3Q4"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TS_IND_TKTHEAD_09Q3Q4" )
PARALLEL 4
DATA:
2000120600662 06-Dec-2000 11:39:56 PM 12671 1243 UNKNOWN 5 11 0 1243 1243 -1 0 0 916 576 2675 06-Dec-2000 03:48:22 PM ANI CUSTOMER 0 0 -1 916 576 2675 0 06-Dec-2000 03:48:22 PM 0 06-Dec-2000 03:48:22 PM 0 0 0 0 CLOSED VOID 0 0 0 10-May-2001 10:17:18 PM 10873 unknown TXSAN.CSLOC TXSAN.CSLOC TXSAN.CSLOC 16-May-2008 05:50:29 PM unknowni TXSAN.CSLOC TXSAN.CSLOC TXSAN.CSLOC sburke 0 1 ALL PHONE 0 1
2001021300976 23-Apr-2001 03:00:49 PM 50766 2113 UNKNOWN 5 2 0 2113 2113 -1 0 0 75fnode 13-Feb-2001 11:12:48 AM EQUIPMENT 0 0 1 75fnode 0 13-Feb-2001 11:12:48 AM 0 13-Feb-2001 11:12:48 AM 0 0 0 0 CLOSED VOID 0 0 0 22-May-2001 01:30:37 PM 10866 unknown MABST.3CMNOD MABST.3CMNOD MABST.3CMNOD 16-May-2008 05:50:29 PM unknown MABST.3CMNOD MABST.3CMNOD MABST.3CMNOD jcece 0 1 ALL PHONE 0 1
2001022100287 21-Mar-2001 07:00:37 PM 62393 9974 UNKNOWN 5 14 0 9974 9974 -1 0 0 3P19S.S63.0031 20-Feb-2001 08:53:57 PM CIRCUIT CUSTOMER 0 0 0 -1 3P19S.S63.0031 0 20-Feb-2001 08:53:57 PM 0 20-Feb-2001 08:53:57 PM 0 0 0 0 CLOSED VOID 0 0 0 28-Apr-2001 03:47:18 PM 12782 mclement9486 CASAC.SSO CASAC.SSO CASAC.SSO 16-May-2008 05:50:29 PM mclement9486 CASAC.SSO CASAC.SSO CASAC.SSO unknown 0 01-Jan-1970 12:00:00 AM 1 ALL PHONE 1 N N 0 1
2001022101367 21-Feb-2001 09:57:41 PM 42424 2935 UNKNOWN 5 4 0 2935 2935 -1 0 0 0808 105 0020 21-Feb-2001 10:46:50 AM SWITCHED CLI 0 0 -1 0808 105 0020 0 21-Feb-2001 10:46:50 AM 0 21-Feb-2001 10:46:50 AM 0 0 0 0 CLOSED VOID VOID 0 0 0 23-Apr-2001 05:54:57 PM 11063 unknown UKLN.CSCCO UKLN.CSCCO UKLN.CSCCO 16-May-2008 05:50:29 PM gharvey UKLN.CSCCO UKLN.CSCCO UKLN.CSCCO unknown 0 01-Jan-1970 12:00:00 AM 1 ALL PHONE 0 1
Hope this helps.
Thanks in advance,
Arindam

Similar Messages

  • Table partition based multiple date columns

    Hi , I am using Oracle 10G db. One of the source table has 26 million rows. Partition is based on business send date(Quaterly). Now the query that used to load the target table is based on ETL load date. Since the load date is not the partition column,the source query is taking long time to fetch.Can someone please suggest how to include ETL load date in the partition column or if any other way to improve the performance of the source query will be greatly appreciated.Thanks

    Partition is based on business send date(Quaterly).
    Can someone please suggest how to include ETL load date in the partition column
    Technically? Sure - just redefine the table (DBMS_REDEFINITION) and partition it on ETL load data.
    But someone partitioned on 'send date' for a reason didn't they? Don't you think you might want to find out WHY before you even think about changing it?
    The only info you have provided so far is that someone 'thinks' that a single query is 'taking long time to fetch'. That doesn't even mean anything. What is 'long time': 5 seconds, 5 days? How many rows are being fetched out of 26 million: 1, 20 million?
    1. post the table and index DDL
    2. post the query and execution plan
    3. post the command you executed to produce the stats on the table and indexes
    4. post the number of rows for the query predicates
    5. post info about the number of rows in the result set and what you are doing with them

  • How to get fiscal period based on date and Fiscal year?

    Hi Guys,
               Can anybody tell me how to get Fiscal period based on date and Fiscal Year or fiscal year variant?
    Thanks,
    Gopi.

    Hi,
    Please refer the code below:
    *: Report:  ZFISCALYR                                                  :
    *: Date  :  2004                                                       :
    *: Description: Demonstrates how to return the corresponding fiscal    :
    *:              year and posting period for a company code and posting :
    *:              date or posting date and fiscal year variant.          :
    REPORT  zfiscalyr NO STANDARD PAGE HEADING.
    TABLES: ekko.
    PARAMETERS:     p_bukrs TYPE ekko-bukrs,
                    p_bedat TYPE ekko-bedat.
    DATA: gd_fiscalyr  TYPE bapi0002_4-fiscal_year,
          gd_fiscalp   TYPE bapi0002_4-fiscal_period.
    DATA: gd_fiscalyr2 TYPE T009B-BDATJ,
          gd_fiscalp2  TYPE bapi0002_4-fiscal_period.
    DATA: gd_periv     TYPE t009-periv.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    * get fiscal year and period - (requires date and company code)
      CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
        EXPORTING
          companycodeid = p_bukrs
          posting_date  = p_bedat
        IMPORTING
          fiscal_year   = gd_fiscalyr
          fiscal_period = gd_fiscalp.
    * Alternative fiscal year function module
    * - (requires date and fiscal year variant code from T009 table)
    * gets first entry in fiscal year variant table (will need to choose
    * correct one from table rather than just using first entry)
      SELECT SINGLE periv
        FROM t009
        INTO gd_periv.
    * get fiscal year and period
      CALL FUNCTION 'DETERMINE_PERIOD'
        EXPORTING
          date                      = p_bedat
    *    PERIOD_IN                 = '000'
          version                   = gd_periv
       IMPORTING
          period                    = gd_fiscalp2
          year                      = gd_fiscalyr2
       EXCEPTIONS
          period_in_not_valid       = 1
          period_not_assigned       = 2
          version_undefined         = 3
          OTHERS                    = 4.
    *END-OF-SELECTION.
    END-OF-SELECTION.
      WRITE:/ 'From function module: BAPI_COMPANYCODE_GET_PERIOD',
            / 'Fiscal year is:', gd_fiscalyr,
            / 'Fiscal period is:', gd_fiscalp.
      SKIP.
      WRITE:/ 'From function module: DETERMINE_PERIOD',
            / 'Fiscal year is:', gd_fiscalyr2,
            / 'Fiscal period is:', gd_fiscalp2.
    Thanks,
    Sriram Ponna.
    Edited by: Sriram Ponna on Apr 17, 2008 8:59 PM

  • Is it possible to get the updated table records based on date & time.

    Is it possible to get the updated table records based on date & time in oracle.
    Thanks in advance.

    no, actually i am asking update records using 'UPDATE
    or DELETE' statement, but not insert statement.
    Is it possible?
    I think we can do using trigger on table, but problem
    is if i am having 20 tables means i have to write 20
    trigger. i don't want like this.Of course it's still possible, typically you'll find applications with a column LAST_UPDATE, probably a LAST_UPDATED_BY and so on column. You don't say what your business need is, if you just want a one of query of updates to particular records and have a recent version of Oracle, then flashback query may well help, if you want to record update timestamps you either have to modify the table, or write some code to store your updates in an audit table somewhere.
    Niall Litchfield
    http://www.orawin.info/

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • Partitioning of existing tables.. based on date

    Hello Friends,
    I have some tables where their is a column called x_as_of_dt COLUMN with DATE as the datatype.
    All the tables have already got data populated.
    Now I want to partition the tables based on column x_as_of_dt by YYYYMM
    How to approach this scenario..
    Appreciate your help
    thanks/kumar

    Hello Justin,
    I found that all the tables have indexes and check constraint only ( no primary and foreign key constraints ) for the tables that need to be partitioned .
    The actual table structure is like this.. ( Am using toad and this is the script from toad )
    CREATE TABLE X_FA_X_HOUSEHOLD
    FINANCIAL_ADVISOR_RK NUMBER(10) NOT NULL,
    HOUSEHOLD_RK NUMBER(10) NOT NULL,
    X_AS_OF_DATE DATE NOT NULL,
    FINANCIAL_ADVISOR_ID VARCHAR2(6 BYTE),
    HOUSEHOLD_ID NUMBER(10),
    X_BRANCH_ID VARCHAR2(3 BYTE),
    X_FA_HHD_PCT_SPLIT NUMBER(7,4) NOT NULL,
    X_RANK_NUM NUMBER(3),
    PROCESSED_DTTM DATE
    TABLESPACE KAW_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX XPKX_FINANCIAL_ADVISOR_X_HOUSE ON X_FA_X_HOUSEHOLD
    (FINANCIAL_ADVISOR_RK, HOUSEHOLD_RK, X_AS_OF_DATE)
    LOGGING
    TABLESPACE KAW_IDX
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    GRANT SELECT ON X_FA_X_HOUSEHOLD TO KAW_READ_ROLE;
    REQUIREMENT: - I got to implement the partion on this table for the column - X_AS_OF_DATE
    STEP 1 - CREATE A PARTITIONed table
    CREATE TABLE PARTITION_X_FA_X_HOUSEHOLD
    FINANCIAL_ADVISOR_RK NUMBER(10) NOT NULL,
    HOUSEHOLD_RK NUMBER(10) NOT NULL,
    X_AS_OF_DATE DATE NOT NULL,
    FINANCIAL_ADVISOR_ID VARCHAR2(6 BYTE),
    HOUSEHOLD_ID NUMBER(10),
    X_BRANCH_ID VARCHAR2(3 BYTE),
    X_FA_HHD_PCT_SPLIT NUMBER(7,4) NOT NULL,
    X_RANK_NUM NUMBER(3),
    PROCESSED_DTTM DATE
    PARTITION BY RANGE (X_AS_OF_DATE)(
    PARTITION P200712 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200801 VALUES LESS THAN (TO_DATE(' 2008-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200802 VALUES LESS THAN (TO_DATE(' 2008-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200803 VALUES LESS THAN (TO_DATE(' 2008-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200804 VALUES LESS THAN (TO_DATE(' 2008-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200805 VALUES LESS THAN (TO_DATE(' 2008-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200806 VALUES LESS THAN (TO_DATE(' 2008-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200807 VALUES LESS THAN (TO_DATE(' 2008-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200808 VALUES LESS THAN (TO_DATE(' 2008-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200809 VALUES LESS THAN (TO_DATE(' 2008-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200810 VALUES LESS THAN (TO_DATE(' 2008-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200811 VALUES LESS THAN (TO_DATE(' 2008-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200812 VALUES LESS THAN (TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200901 VALUES LESS THAN (TO_DATE(' 2009-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200902 VALUES LESS THAN (TO_DATE(' 2009-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200903 VALUES LESS THAN (TO_DATE(' 2009-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200904 VALUES LESS THAN (TO_DATE(' 2009-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200905 VALUES LESS THAN (TO_DATE(' 2009-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200906 VALUES LESS THAN (TO_DATE(' 2009-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200907 VALUES LESS THAN (TO_DATE(' 2009-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200908 VALUES LESS THAN (TO_DATE(' 2009-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200909 VALUES LESS THAN (TO_DATE(' 2009-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200910 VALUES LESS THAN (TO_DATE(' 2009-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200911 VALUES LESS THAN (TO_DATE(' 2009-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200912 VALUES LESS THAN (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201001 VALUES LESS THAN (TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201002 VALUES LESS THAN (TO_DATE(' 2010-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201003 VALUES LESS THAN (TO_DATE(' 2010-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201004 VALUES LESS THAN (TO_DATE(' 2010-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201005 VALUES LESS THAN (TO_DATE(' 2010-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201006 VALUES LESS THAN (TO_DATE(' 2010-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201007 VALUES LESS THAN (TO_DATE(' 2010-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201008 VALUES LESS THAN (TO_DATE(' 2010-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201009 VALUES LESS THAN (TO_DATE(' 2010-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201010 VALUES LESS THAN (TO_DATE(' 2010-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201011 VALUES LESS THAN (TO_DATE(' 2010-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201012 VALUES LESS THAN (TO_DATE(' 2011-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201101 VALUES LESS THAN (TO_DATE(' 2011-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201102 VALUES LESS THAN (TO_DATE(' 2011-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201103 VALUES LESS THAN (TO_DATE(' 2011-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201104 VALUES LESS THAN (TO_DATE(' 2011-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201105 VALUES LESS THAN (TO_DATE(' 2011-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201106 VALUES LESS THAN (TO_DATE(' 2011-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201107 VALUES LESS THAN (TO_DATE(' 2011-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201108 VALUES LESS THAN (TO_DATE(' 2011-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201109 VALUES LESS THAN (TO_DATE(' 2011-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201110 VALUES LESS THAN (TO_DATE(' 2011-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201111 VALUES LESS THAN (TO_DATE(' 2011-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201112 VALUES LESS THAN (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION PMAX VALUES LESS THAN (MAXVALUE) )
    STEP 2 - Loading the data ---------
    loading of data is as follows..
    INSERT INTO PARTITION_X_FA_X_HOUSEHOLD
    (FINANCIAL_ADVISOR_RK,
    HOUSEHOLD_RK,
    X_AS_OF_DATE,
    FINANCIAL_ADVISOR_ID,
    HOUSEHOLD_ID,
    X_BRANCH_ID,
    X_FA_HHD_PCT_SPLIT,
    X_RANK_NUM,
    PROCESSED_DTTM
    ) SELECT FINANCIAL_ADVISOR_RK,
    HOUSEHOLD_RK,
    X_AS_OF_DATE,
    FINANCIAL_ADVISOR_ID,
    HOUSEHOLD_ID,
    X_BRANCH_ID,
    X_FA_HHD_PCT_SPLIT,
    X_RANK_NUM,
    PROCESSED_DTTM
    FROM X_FA_X_HOUSEHOLD
    Step 3: - Creating indexes
    CREATE UNIQUE INDEX XPKX_FINANCIAL_ADVISOR_X_HOUSE ON PARTITION_X_FA_X_HOUSEHOLD
    (FINANCIAL_ADVISOR_RK, HOUSEHOLD_RK, X_AS_OF_DATE)
    Step 4: - Droping the actual table
    DROP TABLE X_FA_X_HOUSEHOLD
    Step 5: Renaming the partitioned table to old tablemame
    ALTER TABLE PARTITION_X_FA_X_HOUSEHOLD RENAME TO X_FA_X_HOUSEHOLD
    Does the above steps are correct - pls confirm.
    thanks/kumar

  • Alter table partition

    hi everybody !
    I have a table which also has data in it. Now, before i add some more data to this table i want to create a partition with all the existing data. Following is the error message i get when executing the altertable command.
    ALTER TABLE address_header_temp
    add PARTITION add_head_temp
    VALUES LESS THAN (MAXVALUE);
    error :-
    ORA-14501: object is not partitioned
    Please help me in solving this problem.
    Thanks in advance
    Moloy

    If you wanna do it online, then, use dbms_redine package to redifine objects online. I believe this is one time process. Once you add partitions and you can drop and create partions accordingly. At least you get out of heap table to meet your requirements.
    Otherwise, create another table with required partions and move data from heap (non partitoned) table to partitioned table, drop the old one and rename the new one to old one.
    Jaffar

  • In table maintance to save date and time.

    Hi,
    I am trying to write a code in table maintenance for updating date, time and user id.
    I have created a z include and written a below code which i got from help document. Thid code i have implemented in maintenance event 01. When i checked the code system is showing declare total. Where shall i declare this. Is this code is correct.
    FORM abc.
    DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
    LOOP AT TOTAL.
    IF <ACTION> = desired constant.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDX.
    ENDIF.
    (make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDX.
    ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM.
    Please any one suggest on this.
    Thanks in advance,
    Ravi

    Hi Ravi,
    Can you go to SE80 and check the function group you have provided while creating the table maintainance generator.
    See at the top include what the name SAP has generated for the  internal table .
    I think if you get the name of the internal table name you can do the manipulation.

  • Table for  the PO Date and Stock Transfer Order Date of a material no

    Hello Everyone!
    I am having a requirement where I want both the Purchase Order Date and Stock Transfer Order Date of a perticular material no.
    On the basis of difference of these two dates I want to find out the period for which the material was present in supplying plant.
    I am not getting the table through which I can get these two dates for a material.
    Please help me out.
    Its urgent.

    hi,
    see these tables:
         EKKO – Purchase Order Header Table
         EKPO – Purchase Order Item  Table
         EKBE – PO History table.
    reward if its useful

  • How to create a table which contains relational data and Document data

    hai all
    i need to create a table which contains relational data(i mean coulumns whose data types are type NUMBER,VARCHAR) and documents(like xml file/html file/image)using iFS.
    when i store the document data(xml data/html data) in the iFS ,it will be stored as Document Object.so how do i relate this document object belongs to a particular row in a table.
    do guide me
    thanks

    Please see reply at http://technet.oracle.com:89/ubb/Forum36/HTML/000778.html

  • Quantities/Dates and Status tab in purchase requisition is not working

    Help!!! In the Quantities/Dates tab of Purchase Requisition is not updating the Quantity Ordered field if a Scheduling Agreement was created, no matter if have a Delivery Schedule or Goods Receipt, and in the Status tab is not updating the Ordered field.

    Ok, but you can create a Scheduling agreement whit reference a PR and the PR show in the Status tab the number of Scheduling agreement created and the total quantity ordered to date, but is not showing the data, and in the Quantities/dates tab of PR __is not showing the Quantity Ordered too_, that is the problem, however that is not happened if you create a PO.

  • Create condition based on date and time

    Hi everyone,
    I'm using Discoverer Plus 10g. I want to create a condition in my worksheet using StageTime (consists of date and time) as the parameter, i.e. StageTime > StartTimeParameter and StageTime < EndTimeParameter.
    I am able to create condition based on the date, but unable to create based on the time. I need to limit the data up to the hour, e.g.
    StageTime > 11-NOV-2005 1 AM and StageTime < 11-NOV-2005 3 AM.
    But so far I am unable to create a condition for the hour element.
    I try to use this:
    TO_DATE(TO_CHAR(:Start Date Parameter,'mm-dd-yyyy')||' '||:Start Hour||':00:00','mm-dd-yyyy hh24:mi:ss')
    Start Date Parameter is selected using the date picker in Discoverer Plus
    and the Start Hour is in the format '00' to '23'
    but was prompted with the error: ORA-015858 a non numeric character was found where a numeric was expected.
    Would really appreciate anyone's help on this! :)
    Thanks,
    Angeline :)

    how about, if :Start Date Parameter is of type DATE and :Start Hour is of type varchar2(2) to simply do
    :Start Date Parameter + to_number(:Start Hour)/24
    ?

  • Show days left until reset based on date and condition associated with date

    My question is simlilarly based to the previous discussion https://discussions.apple.com/message/15134714#15134714
    What I need to do is display the number of days until I have to reset a flight condition (FS Column) based on a set number of days (60 days).  I have several colums of information but the two I would use is a Date Column and the FS Column(drop down menu with text for options). I would need to be able to look at certain FS options and use the date associated with it to subtract from 60.
    If FS= "NG" use date associated with it to add 60 days, and then use that date to compare it with today's date to show how many days are left till the 60 day mark.
    So if the last "NG" was Jan 1, 2011 and today was Feb 1, 2011 I would want one cell to show 30 days and another cell to show Mar 2, 2011.
    I need to fly in a certain condition once every 60 days. I want to show how many days left I have until I need to reset that 60 day counter.  Also, I would like to have another cell show the date associated with the day I would need to reset that counter on.
    Unfortunately I am in a limited internet environment so I can not post a picture of my spreadsheet.  Sorry for the over explination, trying to make it as clear as possible first go round.
    Thanks in advance!

    Aron,
    I added a few columns to correlate the conditions and dates. There may be a better way than this brute force approach, but this will work.
    Date
    DS
    FS
    Hrs
    Seat
    Mission ID
    D
    H
    N
    NG
    NS
    Aug 1, 2011
    PI
    D
    1.0
    F
    C
    8/1/11
    Aug 1, 2011
    PI
    N
    0.5
    F
    C
    8/1/11
    Aug 2, 2011
    PI
    D
    0.5
    F
    C
    8/2/11
    Aug 2, 2011
    PI
    NS
    1.4
    F
    C
    8/2/11
    Aug 4, 2011
    PI
    NS
    0.2
    F
    C
    8/4/11
    Aug 12, 2011
    PI
    NG
    1.0
    F
    C
    8/12/11
    Aug 12, 2011
    PI
    NS
    1.2
    F
    C
    8/12/11
    Aug 14, 2011
    PI
    NG
    0.5
    F
    C
    8/14/11
    Aug 14, 2011
    PI
    H
    0.5
    F
    C
    8/14/11
    Aug 14, 2011
    PI
    NS
    0.6
    F
    C
    8/14/11
    Aug 20, 2011
    PI
    NS
    2.1
    F
    C
    8/20/11
    Aug 21, 2011
    PI
    NG
    2.0
    F
    C
    8/21/11
    Aug 22, 2011
    PI
    NG
    1.0
    F
    C
    8/22/11
    Aug 22, 2011
    PI
    NS
    0.4
    F
    C
    8/22/11
    Aug 29, 2011
    PI
    NS
    0.5
    F
    C
    8/29/11
    Then I added a summary table:
    FS Condition
    LastDate
    Plus 60 Days
    Today is Oct 11, 2011
    Alarm
    D
    8/2/11
    10/1/11
    10d
    Overdue
    H
    8/14/11
    10/13/11
    -2d

  • Creating partitions based on date

    Hello Friends,
    I want to create a table ( x_acc_nnm) with a column x_as_of_dt ( Datatype Date dd/mon/yyyy ) partition on x_as_of_dt.
    Want to partition the table on x_as_of_dt based on YYYYMM
    appreciate your help.
    thanks/Kumar

    Hello,
    Want to partition the table on x_as_of_dt based on YYYYMMI think that this link may help you in this task:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/schemaob.htm#CNCPT88862
    Hope this help.
    Best regards,
    Jean-Valentin

  • Tables for Basic end date and work center for operation

    Hi!
    I need table name to fetch the basic end date of a maintenance order and maintenance work centers with respect to each operation in maintenance order.
    Regards,
    VM
    Edited by: V M on Jul 20, 2010 7:22 AM
    Edited by: V M on Jul 20, 2010 7:35 AM

    Hi VM,
    Input is Order Number (AUFNR).
    You can find the Basic End date of Order in Table AFKO, filed is GLTRP.
    For work center in Operations, you can use the Table AUFPL from AFKO.
    Pass this AUFPL in AFVC and get the ARBID.
    Then pass this ARBID to CRHD Table as OBJID, and get the work Center (ARBPL)
    Regards,
    MLN Prasad

Maybe you are looking for

  • Conflict between Client object model and Item Updated Event Receiver in sharepoint 2010

    Hello All, As per my requirement I have a two custom list. Agent Details Port Name Agent Details contains Agent code, Port Name,  email, address and phone of Agent. Its possible that one Agent Code is connected with multiple Port Name. Basically what

  • Private key

    Hello people, i'm creating a program that needs to generate private keys, i've found out that java has built in libraries that support this so i've tried:                 KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");                

  • Problem in Display the Crystal report using Crystal report Viewer 2008

    Hi All, I have developed crystal web project with crystal report using Eclipse IDE. when I deploy this web application using Tomcat server 6.0 in Windows xp, Windows Vista.. It is working fine.. But When I deploy it into Windows 2000 server ,  I am n

  • How do I maketotally custom e-mails that everyone can see without downloadi

    I run a website made on iweb. It is http://Ostyn-Newman.com I send out periodic annoucements to several hundred clients announcing new products on the site. I currently use IPhoto to process photos and send them via e-mail from that application. They

  • No folios in viewer

    Our magazin in iTunes Store, there were 2 folios in it. I've submitted the third folio, but waiting for Apple review in-app purchases. But for all this time if you download application in store and open it there no issuses in it and "updating library