Sponsored Content
Top Forums Programming How do I partition an Oracle 11g Table? Post 302928256 by bbbngowc on Wednesday 10th of December 2014 09:20:39 AM
Old 12-10-2014
Thanks for checking. I have this query and I thought i understood the interval partitioning, but it's giving me the following error. Can you help with the proper syntax please?


Code:
SQL Error: ORA-14752: Interval expression is not a constant of the correct type


Here is the statement.

Code:
CREATE TABLE "AUDIT_COLLECTION_EVENTS" 
   ("AUDIT_TS" TIMESTAMP (6) DEFAULT sysdate, 
    "AUDIT_ID" NUMBER(20,0) DEFAULT -1, 
     "EVENT_NAME" VARCHAR2(48 CHAR) DEFAULT (null), 
     "EVENT_VALUE" VARCHAR2(256 CHAR) DEFAULT (null), 
    "TABLE_TXN_ID" NUMBER(20,0)
   )
  TABLESPACE "AUDIT"
  
  PARTITION BY RANGE ("AUDIT_TS") INTERVAL (NUMTODSINTERVAL(1,'MONTH')) 
 (PARTITION "PART1"  VALUES LESS THAN (TO_DATE('2014-12-01', 'YYYY-MM-DD'));


Last edited by bbbngowc; 12-10-2014 at 10:27 AM..
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Switching user to oracle to connect Oracle 11g DB with 'sysdba'

I need to connect my Oracle 11g DB from shell script with 'sysdba' permissions. To do this I have to switch user from 'root' to 'oracle'. I've tried the following with no success. su - oracle -c "<< EOF1 sqlplus -s "/ as sysdba" << EOF2 whenever sqlerror exit sql.sqlcode;... (2 Replies)
Discussion started by: NetBear
2 Replies

2. Solaris

need help in oracle upgrade from 10g to 11g

Hi , situation has come where in i want to upgrade my database from 10g to 11g ,my code heavily depends on Pro*C , i just want to know if i upgrade my DB from 10g to 11g , will there be any changes in my pro*c compiler ..? if so then wat are the prerequisites i need to check ..? thanks ... (2 Replies)
Discussion started by: senkerth
2 Replies
CREATE 
CONVERSION(7) SQL Commands CREATE CONVERSION(7) NAME
CREATE CONVERSION - define a user-defined conversion SYNOPSIS
CREATE [DEFAULT] CONVERSION conversion_name FOR source_encoding TO dest_encoding FROM funcname DESCRIPTION
CREATE CONVERSION defines a new encoding conversion. Conversion names may be used in the CONVERT() function to specify a particular encod- ing conversion. Also, conversions that are marked DEFAULT can be used for automatic encoding conversion between frontend and backend. For this purpose, two conversions, from encoding A to B AND from encoding B to A, must be defined. To be able to create a conversion, you must have the execute right on the function and the create right on the destination schema. "PARAM- ETERS" DEFAULT The DEFAULT clause indicates that this conversion is the default for this particular source to destination encoding. There should be only one default encoding in a schema for the encoding pair. conversion_name The name of the conversion. The conversion name may be schema-qualified. If it is not, the conversion is defined in the current schema. The conversion name must be unique within a schema. source_encoding The source encoding name. source_encoding The destination encoding name. funcname The function used to perform the conversion. The function name may be schema-qualified. If it is not, the function will be looked up in the path. The function must have the following signature: conv_proc( INTEGER, -- source encoding id INTEGER, -- destination encoding id CSTRING, -- source string (null terminated C string) CSTRING, -- destination string (null terminated C string) INTEGER -- source string length ) returns VOID; NOTES
Use DROP CONVERSION to remove user-defined conversions. The privileges required to create a conversion may be changed in a future release. EXAMPLES
To create a conversion from encoding UNICODE to LATIN1 using myfunc: CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc; COMPATIBILITY
CREATE CONVERSION is a PostgreSQL extension. There is no CREATE CONVERSION statement in SQL99. SEE ALSO
CREATE FUNCTION [create_function(7)], DROP CONVERSION [drop_conversion(7)], PostgreSQL Programmer's Guide SQL - Language Statements 2002-11-22 CREATE CONVERSION(7)
All times are GMT -4. The time now is 01:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy