Home » SQL & PL/SQL » SQL & PL/SQL » INSERT into a Partition
INSERT into a Partition [message #647201] Fri, 22 January 2016 06:27 Go to next message
tony_soprano786
Messages: 5
Registered: November 2015
Junior Member
Hi

I have to two tables with identical structures. One table has newer data present with it in the more recent partitions, I simply was run a insert into the older table, with the new table data, so the more recent partitions in the old table get populated.

So, I've ran:

INSERT INTO SCHEMA.TABLE_OLD PARTITION (PARTITION_JAN_2016)
SELECT * FROM SCHEMA.TABLE_NEW PARTITION (PARTITION_JAN_2016);


The SQL runs fine, I get told that X number of rows have been created but when I view the partition in question, the data isn't present. Why is this? What have I missed here?

Thanks.
Re: INSERT into a Partition [message #647202 is a reply to message #647201] Fri, 22 January 2016 07:36 Go to previous messageGo to next message
flyboy
Messages: 1903
Registered: November 2006
Senior Member
Hi,

Do you "view the partition in question" in the same session which ran the INSERT statement?

If not, did you issue COMMIT after INSERT to make all changes performed in the transaction permanent and available for another sessions?

How exactly do you "view the partition in question"?
Re: INSERT into a Partition [message #647203 is a reply to message #647202] Fri, 22 January 2016 07:38 Go to previous messageGo to next message
tony_soprano786
Messages: 5
Registered: November 2015
Junior Member
I made a school boy error, which I realised after to which you have alluded too. I didn't commit the INSERT:/ - Silly me.

Thanks for the reply anyway:)

[Updated on: Fri, 22 January 2016 07:39]

Report message to a moderator

Re: INSERT into a Partition [message #647206 is a reply to message #647203] Fri, 22 January 2016 09:32 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And when you post a question you MUST copy and paste what you actually did and got, not what you think you did.
Also you MUST all the elements we need to reproduce what you did: CREATE statements for ALL objects involved, INSERT statements...
In the end, you MUST post your Oracle version, with 4 decimals.

Previous Topic: separate string by comma
Next Topic: Interval Partitioning and local index
Goto Forum:
  


Current Time: Thu Apr 25 13:51:38 CDT 2024