473,791 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

In Clause - to query text file

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\162 0-1630_extract.xl s '[Excel 8.0;];

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

Jul 24 '06 #1
2 4631
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**********@g mail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.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\162 0-1630_extract.xl s '[Excel 8.0;];

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

Jul 24 '06 #2

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=Delimi ted;HDR=Yes;DAT ABASE=C:\Direct oryPath\;].[FileName#txt];

SELECT * INTO
[Text;FMT=Delimi ted;HDR=Yes;DAT ABASE=C:\Direct oryPath\;].[FileName#txt]
FROM TableOrQueryNam e;

cheers
Garth

Jul 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11477
by: Rob Wahmann | last post by:
Hello - I'm using the following syntax: WHERE pages.ParentID=0 AND CONTAINS(pages.regionID,'#request.thisRegion#') ....and I get the folowing error: Execution of a full-text operation failed. A clause of the query contained only ignored words. I'm trying to see if a simple column which contains comma delimited numbers
5
11509
by: malcolm | last post by:
Example, suppose you have these 2 tables (NOTE: My example is totally different, but I'm simply trying to setup the a simpler version, so excuse the bad design; not the point here) CarsSold { CarsSoldID int (primary key) MonthID int DealershipID int NumberCarsSold int
2
2363
by: aj70000 | last post by:
This is my query select ano,max(date),a_subject from MY_TAB where table_name='xyz' and ano=877 group by a_subject,ano order by a_subject ANO max(Date) A_Subject 877 2005-01-20 00:00:00.000 Subject_1 877 1900-01-01 00:00:00.000 Subject_2 877 2004-12-20 00:00:00.000 Subject_3
2
5571
by: Michael C | last post by:
Hi all. When I run the following query against my Access database - from within Access - it returns the correct results (5 records in this instance): SELECT * FROM WHERE = "Clothes" AND LIKE "*brown*" However, when I run it from my ASP.NET page via an OleDBCommand, it returns 0 records every time. Now for the kicker: When I drop the LIKE clause, the query returns the correct results (10 records in this instance) from within...
3
1869
by: Sean Shanny | last post by:
To all, We are running postgresql 7.4.1 on an G5 with dual procs, OSX 10.3.3 server, 8GB mem, attached to a fully configured 3.5TB XRaid box via fibre channel. I think we have run into this issue before but I thought the code was fixed. :-( I have the following SQL:
2
720
by: Zygo Blaxell | last post by:
I have a table with a few million rows of temperature data keyed by timestamp. I want to group these rows by timestamp intervals (e.g. every 32 seconds), compute aggregate functions on the columns, and ultimately feed the result into a graph-drawing web thingy. I'm trying a few different ways to get what seems to be the same data, and seeing some odd behavior from the query planner. The table looks like this:
1
348
by: garth.waring | last post by:
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 IN 'C:\Reports\1620-1630_extract.xls ';
2
10758
by: Jim.Mueksch | last post by:
I am having a problem with using calculated values in a WHERE clause. My query is below. DB2 gives me this error message: Error: SQL0206N "APPRAISAL_LESS_PRICE" is not valid in the context where it is used. SQLSTATE=42703 SELECT DISTINCT S3.OPR_APPLICATION_NR, S3.APPLICATION_ID, S3.APPRAISAL_TYPE_CD, S3.Appraisal_Used_Amount, S3.RPT_LEVEL2_NR,
8
3482
by: chrisdavis | last post by:
I'm trying to filter by query or put those values in a distinct query in a where clause in some sort of list that it goes through but NOT at the same time. Example: ROW1 ROW2 ROW3 ROW4 , etc. I want to go to the first row, do a WHERE statement, return the
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9997
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5435
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.