That's strange. under normal circumstances placeholders are much more efficient, especially if you reuse the statement handle returned by $dbh->prepare() and run the query many times. Do you have any links to this problem?
In case you need to use $dbh->quote() it's possible to use Interpolation to make the syntax nicer:
use Interpolation "'" => sub {"'".$dbh->quote($_[0])};
#...
$sql = qq{
declare \@usrid int, \@sysusrid int
select \@sysusrid = suser_id($'{$usrname}')
select \@usrid = $IDVALUE from $ID
where $IDNAME = 'USR_ID'
insert into APPUSR (APP_CD, USR_ID, USRNAME,
USRFNAME, USRLNAME, FNCGRP_CD, SYSUSR_ID)
values ('A', \@usrid, $'{$usrname}',
$'{$first}', $'{$full_last}', $fncgrp, \@sysusrid)
};
|