Hi,
Thanks a lot in advance for your help.
Here is the problem I have:
We have two patients in MS SQL Server database.
Doug --> 1425648232001530
Margie --> 1425648232001532
The problem is PERL is returning the IDs from DB after rounding the ID. For example: for Margie, the ID is 1425648232001532. But PERL pulls it as 1425648232001530, which is Doug's ID.
Here is the code:
sub db_query_ {
my ($query,$dbh)=(@_);
Math::BigInt->accuracy(undef);
Math::BigInt->round_mode(undef);
Math::BigInt->precision(undef);
$dbh->ping() or $dbh=Mconnect();
#$dbh->{LongReadLen} = 400000;
#$dbh->LongReadLen(4000);
$dbh->{LongTruncOk} = 0;
my $sth = $dbh->prepare($query);
$sth->execute() or die "on DB query -$query- error sql:".$sth->errstr;
my $res = $sth->fetchall_arrayref();
#print Dumper ($res);
return $res;
}
sub sql2_1{
my ($self,$con)=(@_);
my $sql="exec PATIENT_DETAILS_SSP '$PatientPhone', '$CareLocationDID', '$SSN4', '$BirthYear' ";
to_log($self,"SQL2.1: $sql", 5);
my $res = db_query_($sql, $con);
to_log($self,"SQL2.1: Results:: $res", 3);
#print Dumper($res);
return $res;
}
The data from DB is coming as "1.42564823200153e+15" which is missing the 2 at the end.
Can you please suggest a solution?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.