Okay, I've been all through this forum trying to figure out what I'm doing wrong, and I'm finally going to post my strange happening....
First off, here's what I'm using: - Windows 2003 SP2 32bit - QuickBooks Enterprise 2007 - SQL Server 2005 SP2 - QODBC Driver 8.00.00.240
I am trying to dump all my QB tables into a SQL database for report creation, no updating, inserting, etc. I have created a linked server in SQL2005 successfully and it can pull data (I can use the sp_report queries just fine). However, when I try and do a SELECT * FROM <anything> I get no data. Let me clarify that a bit...
I'm using the following statement: SELECT * FROM OPENQUERY(QODBC,'SELECT * FROM Account') I get nothing from any tables, except BillLinkenTxn, Check, CheckExpenseLine, CreditMemoLinkedTxn, and InvoiceLinkedTxn. For all other tables I receive the message "(0 row(s) affected)" and only get the column header info. (So I know it can see the tables, but not the data.)
Even stranger, if I modify the above statement to read: SELECT * FROM OPENQUERY(QODBC,'SELECT * FROM Account' UNOPTIMIZED) I get data back from Account, Bill, BillExpenseLine, etc until I start hitting tables that throw the "Unexpected NULL value was returned..." error.
I've messed around with the Optimizer settings as suggested in many other posts by Tom, but nothing helps. When running the first query, I can see my .OPT file growing, but then nothing gets spit out. (I've deleted the .OPT file many times as well.)
I tried following the steps from the document "Importing Quickbooks into MS SQL Server Utilizing QODBC", but that document was written with SQL2000 and the DTS that was in SQL2000 has been completely rewritten in SQL2005 to be SISS.
Anyone have a way to get the QB data into a SQL2005 database, or know what's going on with my weird data reads??? |