Re: TEXT Files
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 09 May 2005 22:41:47 +0200
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)
.
- References:
- TEXT Files
- From: GW
- TEXT Files
- Prev by Date: Re: query problem
- Next by Date: Re: HL7 to flat file
- Previous by thread: TEXT Files
- Next by thread: User-Defined string Functions Transact-SQL
- Index(es):
Relevant Pages
|
|