General information
Forum:
Microsoft SQL Server
Title:
Using openquery to insert into a linked oracle database
Can some one send me or post an example of inserting data into an Oracle database from a SQL 7 stored proceedure using OpenQuery. I've looked at the knowledgebase, Transact SQL Help, and Books online but I still can't get it to work.
This is what I've been using so far:
INSERT INTO OPENQUERY(oracle,'select cust_acct,TO_CHAR(plan_id),wtn,service,prov from tbl_customer') (cust_acct,TO_CHAR(plan_id),wtn,service,prov)
VALUES('Test','0','Test','Test','NS')
This is the error:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '('.
Thanks ahead of time.
Rod Smith
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only