Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 SQL to Excel sheet not agree with SQL Studio call

Author  Topic 

SteveT9182
Starting Member

4 Posts

Posted - 2014-03-26 : 14:48:38
Same SQL call executed in Excel, which joins three tables, does not give an identical result to the same call in SQL Studio.
The last field is dropped out of the main table in the Excel sheet, though all other fields are there from all other tables.

This looks pretty much like a Microsoft Excel bug!

I have an image of the call I made but I'm not sure how I can send this? Not sure how to send the Excel sheet either that shows the difference? Maybe attachments on email?
Excel code to achieve it was:

With ActiveSheet.QueryTables.Add(Connection:=connstring, Destination:=Range("A1"), Sql:=SqlString)
.Refresh


SqlString held the SQL call joining three tables. Any suggestions as to what might be wrong?

Regards,
Steven Tennett
   

- Advertisement -