Solved

SQL 2000 insert into an oracle database

Posted on 2006-10-28
5
260 Views
Last Modified: 2008-02-01
I have created a linked server to n oracle database which works fine i.e. I can pull data. However I want to insert data into this oracle table depending on rows returned from a SQL 2000 query:


1. select * from my table
2. insert results set into the oracle database table

How do I link these together using insert into openquery?
0
Comment
Question by:Netstore
  • 2
  • 2
5 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 17825604
insert into openquery(oracle_linked_server, 'select * from oracle_table where 1=0 ' )
  select * from mytable
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17825626
INSERT INTO OPENQUERY( oracle , 'select Col1,Col2..from OracleTable) (Col1,Col2.. )
SELECT Col1,Col2..From myTable


0
 
LVL 5

Author Comment

by:Netstore
ID: 17825636
Cheers !!! Much simpler than I thought, thanks for the quick response !!
0
 
LVL 5

Author Comment

by:Netstore
ID: 17825717
Another quickie when I try and save this to a stored procedure I get an error 7405 - queries require the ANSI_NULLS and ANSI_WARNINGS to be set for the connection. Any ideas?
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17825758
SET ANSI_NULLS ON
SET ANSI_WARNINGS ON

CREATE PROCEDURE ....
AS.

etc
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question