Skip to Content.
Sympa Menu

freetds - Re: [freetds] bcp/datacopy numeric columns

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] bcp/datacopy numeric columns
  • Date: Thu, 22 May 2014 08:49:21 +0100

2014-05-21 8:51 GMT+01:00 John Kendall <john AT capps.com>:
> Big thanks to Frediano for fixing bit columns in bcp.
>
> I'm running into a problem using datacopy and numerics now. The decimals
> get truncated.
>
> The problem is easy to reproduce:
>
> create table tempdb..tbla (num numeric(10,2))
> insert tempdb..tbla values (12345.67)
>
> $ datacopy -c dbo -S SRV/usr/pw/tempdb/tbla -D
> SRV/usr/pw/tempdb/tblb
>
> select * from tempdb..tbla
> num
> -------------
> 12345.67
>
>
> select * from tempdb..tblb
> num
> -------------
> 12345.00
>
> Note we lost 0.67. No error messages from data copy.
> The problem occurs with both Sybase and MS SQL Server.
> I’m running this on SPARC, if endianess matters.
>
> Thanks,
> John
>


Fixed in 0.92. Unfortunately it's far from easy to backport to stable
version. I had to implement a new binding in dblib. It will also
require some additional test.

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page