|
|
sybperl-l Archive
Up Prev Next
From: geniss at foliofn dot com (Seva Genis)
Subject: RE: DBlib BCP fails under Syb11.9.2.3
Date: Aug 30 2000 5:49PM
Sure
-->to create table:
CREATE TABLE dbo.ftc_categorystock
(
smsecid int NOT NULL,
socialcategoryoid numeric(24,0) NOT NULL
)
ON seg1
go
ALTER TABLE dbo.ftc_categorystock ADD CONSTRAINT ftpk_ftc_categorystock
PRIMARY KEY CLUSTERED (smsecid,socialcategoryoid)
ON seg1
go
-->perl script as below
#!/usr/local/bin/perl
use Sybase::BCP;
require 'sybutil.pl';
$bcp = new Sybase::BCP d7folio1, d7folio1, FTDEV01;
$bcp->config(INPUT => '/dumps/dev_sec_master_bcp/ftc_categorystock.asc',
OUTPUT => 'd7folio1..ftc_categorystock',
BATCH_SIZE => 200,
FIELDS => 2
);
$bcp->run;
-->data file is attached
Thank you,
Seva
-----Original Message-----
From: owner-SYBPERL-L@list.cren.net
[mailto:owner-SYBPERL-L@list.cren.net]On Behalf Of Michael Peppler
Sent: Wednesday, August 30, 2000 1:25 PM
To: SybPerl Discussion List
Subject: Re: DBlib BCP fails under Syb11.9.2.3
Seva Genis writes:
>
> We recently upgraded from 11.5 to 11.9 and started seeing
> Sybperl BCP failures. What happens is if you bcp into the
> table that has numeric column BCP fails as following:
>
> error: Sybase error: 'Unknown datatype encountered.'
>
> error: Sybase error: 'Requested data-conversion does not exist.'
>
> error: Problem in initializing BCP, bcp_meminit() retruned '3'
>
> changing column datatype to float, int, char, varchar fixes
> this error but unfortunatelly in not an option.
Hmmm - normally Sybase takes care of these sort of data conversions.
Could I see a minimal script that illustrates the problem please?
Thanks,
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|