Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Using Microsoft Query

I'm am using Microsoft query to return data from a combination of 2 sheets
within the workbook and into a new sheet.
How can I control the sql to always find the spreadsheets in the workbook in
the current directory? So that if I save the workbook to different location
the queries work for the workbook in the new location. At present if I save
it back it looks to the old location for the tables.

Thanks

Paul


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Using Microsoft Query

Paul Johnson wrote:
How can I control the sql to always find the spreadsheets in the

workbook in
the current directory? So that if I save the workbook to different

location
the queries work for the workbook in the new location. At present if

I save
it back it looks to the old location for the tables.


Simply omit the path in the connection string e.g.

instead of

SELECT * FROM [Excel 8.0;Database=C:\Tempo\Book1.xls;].[A:A];

use

SELECT * FROM [Excel 8.0;Database=Book1.xls;].[A:A];

Jamie.

--

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query from microsoft query- Excel 2007 טבלאות אקסל 2007 Excel Discussion (Misc queries) 0 December 24th 07 10:47 PM
MICROSOFT QUERY POLARBILLY Excel Worksheet Functions 0 July 29th 07 07:48 PM
What is microsoft query? FARAZ QURESHI Excel Discussion (Misc queries) 1 March 4th 07 08:04 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM
Microsoft Query Excel GuRu Excel Discussion (Misc queries) 1 March 23rd 05 06:15 PM


All times are GMT +1. The time now is 11:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"