BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to read from Text File by SQL syntax

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
bill
Guest





PostPosted: Thu Jun 26, 2003 10:57 am    Post subject: How to read from Text File by SQL syntax Reply with quote



Hi,
How to write the SQL syntax that can read from Text File?
Thanks!
bill




Back to top
Tom Olson
Guest





PostPosted: Thu Jun 26, 2003 11:14 am    Post subject: Re: How to read from Text File by SQL syntax Reply with 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:
Quote:
Hi,
How to write the SQL syntax that can read from Text File?
Thanks!
bill







Back to top
Robert MacLean
Guest





PostPosted: Thu Jun 26, 2003 11:25 am    Post subject: Re: How to read from Text File by SQL syntax Reply with quote



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





PostPosted: Thu Jun 26, 2003 11:44 am    Post subject: Re: How to read from Text File by SQL syntax Reply with quote

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





PostPosted: Thu Jun 26, 2003 4:57 pm    Post subject: Re: How to read from Text File by SQL syntax Reply with 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
bill
Guest





PostPosted: Fri Jun 27, 2003 1:10 am    Post subject: Re: How to read from Text File by SQL syntax Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.