in reply to Re: Perl DBI escape reserved word in Ingres database
in thread Perl DBI escape reserved word in Ingres database

It has returned "1", btw this is a boolean type column, intrigued.

Got it!

Solution: my $ref =  $dbh->selectall_arrayref($sql,undef,'1');

Replies are listed 'Best First'.
Re^3: Perl DBI escape reserved word in Ingres database
by poj (Abbot) on Feb 22, 2019 at 15:05 UTC

    It doesn't look like BOOLEAN is mentioned in DBD::Ingres so try

    my $sql = "SELECT DISTINCT id FROM mytable WHERE open = CAST(? AS BOOL +EAN)"; my $ref = $dbh->selectall_arrayref($sql,undef,'true'); @id = map{ $_->[0] } @$ref; die join (", ", @id), "\n";
    poj
      Whoops, it doesn't work, I did a wrong test previously, sorry my bad. Also, BOOLEAN(?) doesn't work either. btw Ingres doc is poor, IMHO it is a dead technology :/