Re: Fixed length records
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 02 Nov 2005 20:23:25 +0100
On Mon, 31 Oct 2005 12:36:06 -0800, Stan wrote:
>I have to build a text file that has 80 character records. I have a number
>of fixed length fields in the file but need to add a 'filler' at the end of
>the fields to get to 80. Do I have to create a dummy variable to do that and
>if so, how?
>Thanks
Hi Stan,
You can't use regular SQL queries to create a text file. You'll have to
use an external utility for that. The ones most commonly used are bcp or
DTS. Both are described in Books Online.
For bcp, the way to add extra space to pad the record length to 80
characters is to use a format file. For DTS, you'll have to look into
the transformation possibilities.
If you need further help, I advise you to post to another newsgroup.
This group is intended for support of English Query, and it's only used
by few people. The group microsoft.public.sqlserver.tools is intended to
support the tools that come with SQL Server (such as bcp and DTS).
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
- Prev by Date: Re: Compare Character to numberic
- Next by Date: Re: No Decimal trailing sign
- Previous by thread: Re: Compare Character to numberic
- Next by thread: Re: Fixed length records
- Index(es):
Relevant Pages
|
|