MS Query automatically fully qualifying SQL Select Statement

  • Thread starter Thread starter grubstar
  • Start date Start date
G

grubstar

Hi,

MS Query is fully qualifying my SQL Select statement which I am manually
creating using the Get External data function in Excel to get data from SQL
Server

e.g. select * from person changes to select * from dbo.databasename.person
person

Is it possible to stop this happening or is there a different way I can use
the Get External Data function to get data from SQL Server?

I want to distribute the xls file with the queries but the database name may
not be the same on other client machines. Table structure / login is always
the same.

Thanks
 
Hi,
if you distribute the file, the file paths might be
different meaning you would have to modify the query for
each user. to do .. on the external data tool bar, click
edit query. when the wizard come up got to page 3. click
veiw query edit query in microsoft query. the the query
comes up in design mode, click view>SQL. you can edit the
query including file path here.
but i might suggest that instead of distributing the file,
put the file on a public access drive.(if possible) This
way all would have access to the file and you would on
have 1 file to update.
 

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

Back
Top