Sponsored Content
Top Forums Programming How do I partition an Oracle 11g Table? Post 302928260 by Ditto on Wednesday 10th of December 2014 10:06:16 AM
Old 12-10-2014
Quote:
Originally Posted by bbbngowc
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'));

You're using "NUMTODSINTERVAL"
you probably want to use: "NUMTOYMINTERVAL"
instead Smilie

Data Types
 

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
FBSQL_INSERT_ID(3)							 1							FBSQL_INSERT_ID(3)

fbsql_insert_id - Get the id generated from the previous INSERT operation

SYNOPSIS
int fbsql_insert_id ([resource $link_identifier]) DESCRIPTION
Gets the id generated from the previous INSERT operation which created a DEFAULT UNIQUE value. Note The value of the FrontBase SQL function fbsql_insert_id(3) always contains the most recently generated DEFAULT UNIQUE value, and is not reset between queries. PARAMETERS
o $ link_identifier -A FrontBase link identifier returned by fbsql_connect(3) or fbsql_pconnect(3).If optional and not specified, the function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if fbsql_connect(3) was called with no arguments. RETURN VALUES
Returns the ID generated from the previous INSERT query, or 0 if the previous query does not generate an DEFAULT UNIQUE value. If you need to save the value for later, be sure to call this function immediately after the query that generates the value. SEE ALSO
fbsql_affected_rows(3). PHP Documentation Group FBSQL_INSERT_ID(3)
All times are GMT -4. The time now is 02:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy