in reply to Using perl dbi and Sybase IQ doing insert with placeholder getting datatype error
You could try CAST
my $insertMRNQuery = qq{ insert #mrns (PAT_MRN_ID) values (CAST(? AS VARCHAR)) };
or STRING and add the leading zeros in SQL
pojmy $insertMRNQuery = qq{ insert #mrns (PAT_MRN_ID) values (RIGHT(STRING('0000000000',?),10)) };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using perl dbi and Sybase IQ doing insert with placeholder getting datatype error
by ckbbkc (Novice) on Sep 10, 2015 at 22:03 UTC |