| View previous topic :: View next topic |
| Author |
Message |
bill Guest
|
Posted: Thu Jun 26, 2003 10:57 am Post subject: How to read from Text File by SQL syntax |
|
|
Hi,
How to write the SQL syntax that can read from Text File?
Thanks!
bill
|
|
| Back to top |
|
 |
Tom Olson Guest
|
Posted: Thu Jun 26, 2003 11:14 am Post subject: Re: How to read from Text File by SQL syntax |
|
|
To the best of my knowledge standard SQL syntax does not allow for this. What
database are you using? If you are using a database that suppots extended
stored procedures (i.e. MSSQL, Interbase/Firebird, Advantage, etc...) you may be
able to find an extended procedure that will do what you are asking.
Tom
"bill" wrote:
| Quote: | Hi,
How to write the SQL syntax that can read from Text File?
Thanks!
bill
|
|
|
| Back to top |
|
 |
Robert MacLean Guest
|
Posted: Thu Jun 26, 2003 11:25 am Post subject: Re: How to read from Text File by SQL syntax |
|
|
MSSQL supports com object access from stored procedures. so if there is no
method natively in mssql (assuming you are using that) you could always use a
com obj (or even write your own)
Tom Olson (tolson (AT) advancegroup (DOT) com) moved some electrons around and
created the following:
| Quote: | To the best of my knowledge standard SQL syntax does not allow for
this. What database are you using? If you are using a database that
suppots extended stored procedures (i.e. MSSQL, Interbase/Firebird,
Advantage, etc...) you may be able to find an extended procedure that
will do what you are asking.
Tom
"bill" wrote:
Hi,
How to write the SQL syntax that can read from Text File?
Thanks!
bill
|
--
___________________________________________
Robert MacLean
robert at sadev dot co dot za
Web: http://www.sadev.co.za
|
|
| Back to top |
|
 |
Mark Benson Guest
|
Posted: Thu Jun 26, 2003 11:44 am Post subject: Re: How to read from Text File by SQL syntax |
|
|
Bill,
The easiest way to do this is to create an ODBC data source for the text
file and then use it as if it were a table. Refer to
http://www.synametrics.com/SynametricsWebApp/WinFAQ.jsp#CanI
MB
bill wrote:
| Quote: | Hi,
How to write the SQL syntax that can read from Text File?
Thanks!
bill
|
|
|
| Back to top |
|
 |
R. Rogers Guest
|
Posted: Thu Jun 26, 2003 4:57 pm Post subject: Re: How to read from Text File by SQL syntax |
|
|
Hi Bill,
You can use the Bulk Insert command, for example:
Bulk Insert MyFirstNames From 'd:progra~1Mssql7DataDataFirstNames.txt'
Hope that helps.
Richard Rogers
|
|
| Back to top |
|
 |
bill Guest
|
Posted: Fri Jun 27, 2003 1:10 am Post subject: Re: How to read from Text File by SQL syntax |
|
|
Hi,
Thank you very much for your help!
Bill
"R. Rogers" <richardis (AT) rogers (DOT) com> gl
news:3efb260a$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi Bill,
You can use the Bulk Insert command, for example:
Bulk Insert MyFirstNames From
'd:progra~1Mssql7DataDataFirstNames.txt'
Hope that helps.
Richard Rogers
|
|
|
| Back to top |
|
 |
|