Copy data from MS SQL Server dbtable to Oracle dbtable

  • Hello to all,

    I want to copy data from a table on MS SQL Server to an Oracle database table using Linked Server via Microsoft OLE DB Provider for Oracle.

    I'm using the following scriptin Query Analyzer:

    INSERT OPENQUERY(OLEOracle, 'select Field_1,Field_2,Field_3 from SCHEMA.TABLE1') values ('select [Field_1],[Field_2],[Field_3] from TABLE1')

    but i had the following error:

    Server: Msg 213, Level 16, State 4, Line 1

    Insert Error: Column name or number of supplied values does not match table definition.

    Do I have syntax error?

    Any ideas?

    Konstantinos C.

  • Probably a syntax error...

    INSERT INTO OPENQUERY(OLEOracle, 'select Field_1,Field_2,Field_3 from SCHEMA.TABLE1')

    SELECT [Field_1],[Field_2],[Field_3] from TABLE1

    --Ramesh


  • I found it.

    It's not a syntax error...

    I'm just assign values to parametres.

  • Has anyone ever done it the other way around? I.e. from within Oracle (say sqlplusw or pl/sql developer) link to a SQL Server table and copy it into an Oracle table.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply