The primary table I loaded into MySql has 2.5 MM records: ID, Ticker,
Date, Price; and all works well. My need is to write a QUERY to export
outfile?) multiple text files. For example, I have 6 years worth of
data, and need to generate 1 file per day that contains all the Tickers
and Prices for that day. Furthermore, I need the text file name to be
the name of the date (e.g. April 4, 1998 with 1000 Tickers & Prices
would result in a file that was named "040498.txt" (either csv or tab
delimited).
Is this possible? If so, can someone please help me in this effort...the
alternative is not pretty.
Thanks in advance!
> Trevor
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!tread (trevor_read@.hotmail.com) writes:
> The primary table I loaded into MySql has 2.5 MM records: ID, Ticker,
> Date, Price; and all works well. My need is to write a QUERY to export
> outfile?) multiple text files. For example, I have 6 years worth of
> data, and need to generate 1 file per day that contains all the Tickers
> and Prices for that day. Furthermore, I need the text file name to be
> the name of the date (e.g. April 4, 1998 with 1000 Tickers & Prices
> would result in a file that was named "040498.txt" (either csv or tab
> delimited).
> Is this possible? If so, can someone please help me in this effort...the
> alternative is not pretty.
The easiest way to do this for MS SQL Server, would be to use the
BCP command-line utility with the queryout function, packaged in
some script that handles the file naming.
But since you are using MySQL and need immediate assistance, you should
probably look around and try to find a MySQL forum to get some more
relevant response.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
No comments:
Post a Comment