I have some queries like this:
FROM cf_status_log WHERE job LIKE 'trans01' ESCAPE '!'
AND host_name LIKE '%' ESCAPE '!'
AND ip_address LIKE '%' ESCAPE '!'
AND server LIKE '%' ESCAPE '!' AND time_stamp > '2014-03-12 19:00:12-
AND time_stamp < ( '2014-03-12 19:00:12-0400'::timestamp
+ interval '60 minute' )
ORDER BY job desc,time_stamp desc
LIMIT 1000 ;
All the columns referenced on the WHERE side are variable, as are the timestamps and the interval (60). I'm seeking advice on how to build this query in DBI in a sane manner.