Hi,
I have setup a linked server to a DB2 database using "Microsoft OLE DB Provider for ODBC Drivers",
the connections works fine i am able to run select queries.
but the number of rows returned from the two following statements are different.
select * from linkedserver...tablename
select count(*) from linkedserver...tablename
e.g. The First statement returns 116 rows, whereas the second query returns count as 144....
I am a bit confused ?
could anybody think of any possible reasons..
Cheers
ARAW012
Hi,which SQL Server version are you using ? There was an issue with SQL Server 2000. Are you able to trace the queries that are actually executed at the DB2 database ? Did you already try to use the OPENQUERY method to pass the query (without any refactoring through the driver stack) through to the DB2 instance ?
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||
i am using SQL server 2005 , and i am using the OPENQUERY method.
I only have read access to the DB2 database.
Thanks
|||The openquery and the "normal" Select behave different, because the OPENQUERY will issue a pass-through to the server instead of doing the interpreted Select query through the driver. So the results can differ according to the changes the driver will do in the middle. Perhaps someone with additional DB2 knowledge can help you here.HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment