-
insert into linked server
hi everybody.I have linked db2 server .Select from this server goes fine but when i do insert
case A
insert into pricing..UCIT.BOOM(A,B) VALUES(3,5)
OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error
case B
SELECT * from
OPENQUERY(pricing, 'insert into UCIT.BOOM(A,B) VALUES(3,5)'
Server: Msg 7357, Level 16, State 2, Line 1
Could not process object 'insert into UCIT.BOOM(A,B) VALUES(3,5)'. The OLE DB provider 'MSDASQL' indicates that the object has no columns.
how to do insert into linked db2 server?
I am running SQL 2000 sp2 on WIN20000
and DB2 UDB 7.2 service pack 4
-
insert into linked server (reply)
Alex,
Here is a code example of an insert I have used:
INSERT INTO OPENQUERY ( SYS38A, 'SELECT * FROM NAOLIB.PUDSLX'
SELECT * FROM PUDSL
SYS38A - An AS400.DB2 server
NAOLIB - The Library on the DB2 database
PUDSLX - The File ( Table ) in the DB2 Library
PUDSL - SQLServer Table
I know I am using Select * in my case but you could specify columns if you wanted. Also, we have installed a product on our SQLServer called HitOLEDB that allows us to query between servers. I am using SQL7 SP 1.
Hope this helps
------------
Alex at 3/24/2002 7:55:20 PM
hi everybody.I have linked db2 server .Select from this server goes fine but when i do insert
case A
insert into pricing..UCIT.BOOM(A,B) VALUES(3,5)
OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error
case B
SELECT * from
OPENQUERY(pricing, 'insert into UCIT.BOOM(A,B) VALUES(3,5)'
Server: Msg 7357, Level 16, State 2, Line 1
Could not process object 'insert into UCIT.BOOM(A,B) VALUES(3,5)'. The OLE DB provider 'MSDASQL' indicates that the object has no columns.
how to do insert into linked db2 server?
I am running SQL 2000 sp2 on WIN20000
and DB2 UDB 7.2 service pack 4
-
insert into linked server (reply)
thank a lot it work ,I read you post and then found info on microsoft site(Q270119).
Have a great day . thank again
------------
Mark_Yelton at 3/25/2002 12:20:12 PM
Alex,
Here is a code example of an insert I have used:
INSERT INTO OPENQUERY ( SYS38A, 'SELECT * FROM NAOLIB.PUDSLX'
SELECT * FROM PUDSL
SYS38A - An AS400.DB2 server
NAOLIB - The Library on the DB2 database
PUDSLX - The File ( Table ) in the DB2 Library
PUDSL - SQLServer Table
I know I am using Select * in my case but you could specify columns if you wanted. Also, we have installed a product on our SQLServer called HitOLEDB that allows us to query between servers. I am using SQL7 SP 1.
Hope this helps
------------
Alex at 3/24/2002 7:55:20 PM
hi everybody.I have linked db2 server .Select from this server goes fine but when i do insert
case A
insert into pricing..UCIT.BOOM(A,B) VALUES(3,5)
OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error
case B
SELECT * from
OPENQUERY(pricing, 'insert into UCIT.BOOM(A,B) VALUES(3,5)'
Server: Msg 7357, Level 16, State 2, Line 1
Could not process object 'insert into UCIT.BOOM(A,B) VALUES(3,5)'. The OLE DB provider 'MSDASQL' indicates that the object has no columns.
how to do insert into linked db2 server?
I am running SQL 2000 sp2 on WIN20000
and DB2 UDB 7.2 service pack 4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|