Trying to show SQL query results in Excel sheet

Please support our Legacy and Other Languages advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2006
Posts: 90
Reputation: bajanpoet is an unknown quantity at this point 
Solved Threads: 0
bajanpoet bajanpoet is offline Offline
Junior Poster in Training

Trying to show SQL query results in Excel sheet

 
0
  #1
Aug 26th, 2008
I've been trying to run an SQL script using an Excel macro. There are hundreds of records (one coumn - Item numbers) returned, and I would love to have the results start at C3 in the Excel worksheet and propagate down until all of the records have been added to the sheet, overwriting any previous item numbers in that particular column of cells. (This will bulk load the worksheet which will execute other formulas based on the item numbers added in this step.)

I enter the script into the Microsoft Query (I'm Importing external data and putting the script into the MS Query) and run the query and see the result set in the window of MSQuery. When I try to return the values to Excel in row C3, I get this error message: "Query results cannot overlap a list or XML mapping. Please select another destination."

PS - I tried to put it in a new worksheet just to make sure that at least the data was getting into the worksheet, but the new sheet came up blank! Now I'm confused.

Any ideas?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Legacy and Other Languages Forum
Thread Tools Search this Thread



Tag cloud for Legacy and Other Languages
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC