Using DBD::Pg im attempting to make an insert statement with binded variables which one of them is a tsrange. I keep getting syntax errors can some one please explain the proper way to do this?
from perl script :
$sth->{'insert'}->execute($hashRef->{'<NUMBER>'}
, $hashRef->{'<FIRSTNAME>'}
, $hashRef->{'<LASTNAME>'}
, $hashRef->{'<DATEIN>'} . ' ' . $hashRef->{'<TIMEIN>'}
, $hashRef->{'<DATEOUT>'} . ' ' . $hashRef->{'<TIMEOUT>'}
, $hashRef->{'<JOBCODE>'}
, $hashRef->{'<JOBCODEDESC>'}
, $hashRef->{'<COSTCODELEVEL1>'}
, $hashRef->{'<COSTCODELEVEL2>'}
, $hashRef->{'<COSTCODELEVEL3>'}
, $hashRef->{'<DEPARTMENT>'}
)or die $DBI::errstr;
enter code here
from config file:
sql:
insert: |-
insert into etl.timeclock_plus values (
?
, ?
, ?
, [ ? , ? ]
, ?
, ?
, ?
, ?
, ?
, ?
)
The error :
syntax error at or near "$4"
[ ? , ? ]section doesn't look like valid SQL.