Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LOAD DATA LOW_PRIORITY LOCAL INFILE - Using A Wildcard?

Status
Not open for further replies.

proximity

Technical User
Sep 19, 2002
132
GB
Hi,

I am required to load some text files using LOAD DATA ETC into a db. So far, so easy. However, what I want to know is whether it is possible to import the file using a wildcard?

My file name will always take the format below and will always be the same length. However, everything about the file name changes each time it is generated by the system - except for the myfilename bit:

prtx010.prtx010.0199.myfilename.265.07124929

At the moment, I rename the above myfilename and run the command.

But it would be nice if there was a way to do it automatically!

Many thanks for any help received,

--
Steven
 
You can handle wildcards pretty well from the command-line. Just start the mysql command-line client with the LOAD DATA command containing the resolved file name. You can put such a command in a CRON job or a scheduled task.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Thanks for the reply, but I'm afraid running the command line client is not possible, in this case. I need to use something like TOAD or any other client into which I can simply type in the SQL and get the results!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top