Location of SQL in an external data connection

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
 
E

EricG

(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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top