Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

insert into table based on row difference (or using minus)

rsar001Mar 20 2014 — edited Mar 21 2014

Hi There,

Oracle Version: 11g

OS: Solaris 10.

Just wondering if it's possble to insert data into a table based on the "minus" operator please?

We have a very large table on one database, that we moved to another database. The table is off by one row for a certain date range, and we were wondering if it's possible to insert that data row in the remote database using the row difference between the two tables.

Here is the query that we are running:

SELECT ID , TO_CHAR (creation_datetime, 'yyyy-mm-dd')

from TABB10

where TO_CHAR (creation_datetime, 'yyyy-mm-dd')='2014-03-18'

minus

SELECT ID , TO_CHAR (creation_datetime, 'yyyy-mm-dd')

from TABB10@TABB_LINK.APDB00

where TO_CHAR (creation_datetime, 'yyyy-mm-dd')='2014-03-18'

ID TO_CHAR(CR

---------------------- ----------

            2.4111E+17 2014-03-18

Any ideas please?

Thanks

This post has been answered by Baris Yildirim on Mar 20 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2014
Added on Mar 20 2014
5 comments
1,238 views