freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] Problem with freebcp and fixed text output
- From: Modesto Sevilla <mpsevill AT uci.edu>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] Problem with freebcp and fixed text output
- Date: Tue, 04 Aug 2009 16:37:39 -0700
Hello,
I am evaluating freebcp as a replacement to bcp (Sybase) while connecting to MS Sql Server 2008. My problem is that when I bcp out a table even if I specify a format file, the output does not come out in fixed length as it did with bcp.
Here is an example:
Table:
create table testbcp
(
term_code char(3) NOT NULL,
cbs_term_code char(6) NOT NULL,
description char(10) NULL,
last_update_date datetime NULL
)
Format file:
10.0
4
1 SYBCHAR 0 3 "" 1 term_code
2 SYBCHAR 0 6 "" 2 cbs_term_code
3 SYBCHAR 0 10 "" 3 description
4 SYBCHAR 0 24 "\n" 4 last_update_date
Output when calling freebcp testbcp out testbcp.dat -f testbcp.fmt -S SERVER -U USERNAME -P PW
093200901TESTING DE
094200902TEST2009-08-04 16:28:11.780
092200906NO DESC2009-08-04 16:28:11.780
But it should be fixed length like this:
093200901TESTING DE
094200902TEST 2009-08-04 16:28:11.780
092200906NO DESC 2009-08-04 16:28:11.780
For some reason it is not padding with spaces according to the format file like the Sybase bcp tool does.
Can anyone help me?
-
[freetds] Problem with freebcp and fixed text output,
Modesto Sevilla, 08/04/2009
-
Re: [freetds] Problem with freebcp and fixed text output,
James K. Lowden, 08/05/2009
- Re: [freetds] Problem with freebcp and fixed text output [NC], Cedric ROUVRAIS, 08/06/2009
-
Re: [freetds] Problem with freebcp and fixed text output [NC],
Cedric ROUVRAIS, 08/06/2009
-
Re: [freetds] Problem with freebcp and fixed text output [NC],
James K. Lowden, 08/06/2009
-
Re: [freetds] Problem with freebcp and fixed text output [NC],
Cedric ROUVRAIS, 08/06/2009
-
Re: [freetds] Problem with freebcp and fixed text output [NC],
Konrad J Hambrick, 08/06/2009
- Re: [freetds] Problem with freebcp and fixed text output [NC], Konrad J Hambrick, 08/06/2009
-
Re: [freetds] Problem with freebcp and fixed text output [NC],
Cedric ROUVRAIS, 08/06/2009
- Re: [freetds] Problem with freebcp and fixed text output [NC], Konrad J Hambrick, 08/06/2009
-
Re: [freetds] Problem with freebcp and fixed text output [NC],
Konrad J Hambrick, 08/06/2009
-
Re: [freetds] Problem with freebcp and fixed text output [NC],
Cedric ROUVRAIS, 08/06/2009
-
Re: [freetds] Problem with freebcp and fixed text output [NC],
James K. Lowden, 08/06/2009
- <Possible follow-up(s)>
- Re: [freetds] Problem with freebcp and fixed text output, rodrigo lopez, 08/05/2009
-
Re: [freetds] Problem with freebcp and fixed text output,
James K. Lowden, 08/05/2009
Archive powered by MHonArc 2.6.24.