all groups > sql server mseq > may 2005 >
You're in the

sql server mseq

group:

TEXT Files


TEXT Files GW
5/3/2005 4:57:02 AM
sql server mseq:
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.
- If no, I have to use DTS. How to execute DTS against the above data
using
command line.

TQ.

Re: TEXT Files Hugo Kornelis
5/9/2005 12:00:00 AM
[quoted text, click to view]

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.


[quoted text, click to view]

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

Best, Hugo
--

AddThis Social Bookmark Button