in reply to Perl DBI escape reserved word in Ingres database

The quote_identifier method should handle the correct quoting for you:
my $sql = 'SELECT DISTINCT id FROM mytable WHERE ' . $dbh->quote_ident +ifier('open') . ' = ?';
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Perl DBI escape reserved word in Ingres database
by jtech (Sexton) on Feb 22, 2019 at 14:02 UTC

    Curiously after applied "quote_ident" it doesn't return anything, not even an error, the @id is empty/undef. It works just fine in other columns but, not with a reserved word between double quotes. Also, I have double checked the data by SQL command and it is in there.

    I haven't played with substring yet and this little monster scares me tbh.