By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 3,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

In Clause - to query text file

P: n/a
Hi all

I have seen the In Clause used to remotely query a text file done but
cannot find the right syntax

The example below is for an excel file :
SELECT *
FROM [1620-1630_extract$]
IN 'C:\Reports\1620-1630_extract.xls '[Excel 8.0;];

There are examples in Access help but not for text files - can anyone
help???

Jul 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can also use [database].[table] like this:

SELECT tblfx_audit.* INTO [Text;DATABASE=c:\].[mytext.txt]
FROM [tblfx_audit]
Remember, a text database is a folder, and a text table
is a text file in that database. (This is a convention
older than Access)

(david)

<ga**********@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hi all

I have seen the In Clause used to remotely query a text file done but
cannot find the right syntax

The example below is for an excel file :
SELECT *
FROM [1620-1630_extract$]
IN 'C:\Reports\1620-1630_extract.xls '[Excel 8.0;];

There are examples in Access help but not for text files - can anyone
help???

Jul 24 '06 #2

P: n/a

david epsom dot com dot au wrote:
You can also use [database].[table] like this:

SELECT tblfx_audit.* INTO [Text;DATABASE=c:\].[mytext.txt]
FROM [tblfx_audit]
Remember, a text database is a folder, and a text table
is a text file in that database. (This is a convention
older than Access)

(david)
Thanks for that David

Found my examples on a disk at home

SELECT * FROM
[Text;FMT=Delimited;HDR=Yes;DATABASE=C:\DirectoryPa th\;].[FileName#txt];

SELECT * INTO
[Text;FMT=Delimited;HDR=Yes;DATABASE=C:\DirectoryPa th\;].[FileName#txt]
FROM TableOrQueryName;

cheers
Garth

Jul 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.