Home Forums SQL Server 2008 T-SQL (SS2K8) OPENQERY Syntax to Insert into SQL Server Table from Oracle Linked Server. RE: OPENQERY Syntax to Insert into SQL Server Table from Oracle Linked Server.

  • ChrisM@Work (8/28/2014)


    Welsh Corgi (8/28/2014)


    ChrisM@Work (8/28/2014)


    Welsh Corgi (8/28/2014)


    The example that I provided is not actually what I need. I want the Insert columns to be all from the Oracle Table.

    Any ideas would be greatly appreciated.

    Remove the join and the WHERE clause.

    I do not get the reason for SELECT Distinct?

    There may be duplicates across the columns selected from the remote. DISTINCT will eliminate those duplicates. Unless the count of such dupes is of interest to you, it makes sense to do this. In any case, it would be more network-efficient to count any dupes at source.

    Or, looking at the sample query provided by Welsh Corgi, they only wanted distinct rows across c1, c2, c3.