|
||||
sybperl-l ArchiveUp Prev Next
From: Michael Peppler <mpeppler at peppler dot org> Michael Peppler writes:
> Konrad Zak writes:
> > hello.
> > with following lines i'm trying to get identyfier value for known to me
> > NAZWA_1 value:
> >
> > $SQL_helpquery = "select ORGANIZACJA_ID from ORGANIZACJA where NAZWA_1 =
> > \"$hashRef{'NAZWA_1'}[0]\"";
> > $ref = $d->ct_sql($SQL_helpquery);
> >
> > and ... perl round ORGANIZACJA_ID=100000...000015 up to 100000...00002,
> > this is "print @$ref->[0][0];" output:
> >
> > 1.00000000000002e+15
> >
> > how can I avoid this? I'll appreciate every advice. best regards.
>
> If you have the latest sybperl I think you can say $dbh->{UseChar} = 1
> to tell sybperl to convert very large numeric values to strings
> instead of numbers. The problem you are seeing is that your very large
> numeric value doesn't fit in a 32 bit int.
Alternatively: select convert(varchar, ORGANIZACJA_ID) should also
solve the problem.
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
|