Location of SQL in an external data connection

  • Thread starter Thread starter Allen_N
  • Start date Start date
A

Allen_N

I have a range that is populated with data from SQL Server when I invoke the
ActiveWorkbook.RefreshAll method in code.

Now I want to modify the SQL behind the query, but I can't see how to expose
it in my Excel 2007 worksheet.

(I'm sure this was easy in 2003, but seems to be hidden by 2007's Ribbon of
Confusion.)

Thanks,
Al
 
(This works for 2003, but should also work in 2007?)

If you right click in the area where the data returned by the query are,
there should be an entry like "Edit Query...". That should open the Query
Wizard, and at the end of all the "Next" buttons, there should be an option
to open the query in the MS Query Editor. When you get to that, you can
click on the SQL button to get a look at your SQL.

HTH,

Eric
 
Back
Top