Welsh Corgi (9/29/2014)
ChrisM@Work (9/29/2014)
We're using OPENQUERY & linked server to run ad-hoc queries against a DB2 database. We discovered quite early on that DB2 (or possibly the driver) will balk at almost anything except a simple string containing nothing more than DB2 SQL. That includes TSQL comments marked with "--". Sometimes you get away with it, sometimes you don't.Thanks for the feedback.
I get the error in development but not in production.
I'm a one man band.
I have been using OPENQUERY against AS400 & Oracle for 3 years as of tomorrow.
I try to avoid at all cost and I used OLE Source and OLE Destination for it is much faster.
In some cases I have had to use it because the Data Transformation would error out on me on a few records for what I belive there were some garbage characters in a column(s).
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/