Re: Passing text file to SQL Server

From: Bryan Martin (uce_at_ftc.gov)
Date: 02/23/04


Date: Mon, 23 Feb 2004 15:15:12 -0500

You should look at bulk insert in the Books online help.

"Chris" <anonymous@discussions.microsoft.com> wrote in message
news:0684D883-C1D7-4B50-85AA-3F5A71B04DF7@microsoft.com...
> Hi,
> I need to pass the entries in a text file to corresponding tables in a
database. Can I pass the entire text file to a stored procedure or can I
write a VB.NET procedure to pharse the file and pass the data to the
database? This is a sample of the text file
>
>
> 1120,011522169050,01,+0000001,031221,0005.95,2003,8331308,20031222
> 9924,014305689050,01,+0000001,031221,0005.95,2003,8331308,20031222
> 1883,012152869050,01,+0000001,031222,0005.95,2003,8331308,20031223
> 1896,017202869050,01,+0000001,031221,0005.95,2003,8331308,20031222
> 1896,072211119050,01,+0000001,031222,0005.95,2003,8331308,20031223
> 1908,028502869050,01,+0000001,031221,0005.95,2003,8331308,20031222
>
> Can you show me some sample code?
>
> Thanks



Relevant Pages

  • load html file into a DIV ?
    ... I have a list of html files and entries in a database with the file ... Anybody got any sample code? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Extended Stored Procedure: Get the current db of the client
    ... with the caveat that you don't recommend it because Microsoft ... of a stored procedure versus umpteen of the same stored procedure spread ... I am not going after Gert Sue. ... the database context as a parameter if you need it, ...
    (microsoft.public.sqlserver.odbc)
  • Trying to set up a SQL Server Agent Account and I hit a wall....
    ... Our database is on SQL Server 2005, however it is set to compatibility mode ... You may need to set the compatibility level ... of the current database to a higher value to enable this feature. ... for the stored procedure sp_dbcmptlevel. ...
    (microsoft.public.sqlserver.security)
  • Re: Extended Stored Procedure: Get the current db of the client
    ... I am not going after Gert Sue. ... the database context as a parameter if you need it, ... Did you ever write an extended stored procedure? ... different than an extended stored procedure, so that is not giving you want ...
    (microsoft.public.sqlserver.odbc)
  • Re: Extended Stored Procedure: Get the current db of the client
    ... Thanks for the link Sue. ... I am not going after Gert Sue. ... the database context as a parameter if you need it, ... Did you ever write an extended stored procedure? ...
    (microsoft.public.sqlserver.odbc)