Re: TEXT Files



On Tue, 3 May 2005 04:57:02 -0700, GW wrote:

>Hi,
>
>FYI, all about SQL is new to me. I would appreciate it if someone could help
>me on
>the following :-
>
>1) I have one text file containing 8 fields separated by pipes (|) and 1000
>of rows
> eg:-
> Chang|Michael|acno1234566|03052005|154.26|1|0|655426.26
> - Is it possible to import the above kind of text files by using the
>query analyzer
> (transact-SQL) without using DTS into the following table format.
> nvarchar|nvarchar|nvarchar|dd/MM/yyyy|decimal|logical|logical|decimal
> - If yes, please help/show me the samples and how can I execute it from
>dos
> prompt by using command line.

Hi GW,

You might wish to check out the descriptions of the BULK INSERT command
and the bcp.exe tool in Books Online. In fact, one of the examples in
the BULK INSERT description looks almost made for this issue.


> - If no, I have to use DTS. How to execute DTS against the above data
>using
> command line.

For help with DTS, your best bet is to visit the group that is devoted
to DTS: microsoft.public.sqlserver.dts.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
.



Relevant Pages

  • TEXT Files
    ... all about SQL is new to me. ... without using DTS into the following table format. ... prompt by using command line. ... How to execute DTS against the above data ...
    (microsoft.public.sqlserver.mseq)
  • Re: how to build a DTS
    ... But at command line i've already test it and doesn't work ... with the windows schedule. ... schedule in SQL Server 2000 with a DTS once the database of TrackIT from ... executable in a ExecuteProcess task or you could call it from the command ...
    (microsoft.public.sqlserver.dts)
  • Re: Insert into without logging or BCP in the same database...
    ... > command) within a stored procedure without using DTS? ... > I've a big query which return more then 20 millions of rows. ...
    (microsoft.public.sqlserver.server)
  • Re: asp.net xp_cmdshell
    ... SqlConnection class to establish a conneciton to SQL Server, ... SqlCommand class to send a command to execute xp_cmdshell (set the ... DTS also provides COM interfaces to interact with if you need a finer ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DTSRun: Cannot create COM Server to load and execute DTS Package. Error -2147221008 (800401F
    ... Allan Mitchell wrote: ... command prompt.Only when I ececute using xp_cmd shell I get the ... Have you installed DTS on the box where you execute this command? ...
    (microsoft.public.sqlserver.dts)