Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Perl DBI escape reserved word in Ingres database

by poj (Abbot)
on Feb 22, 2019 at 15:05 UTC ( [id://1230391]=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^4: Perl DBI escape reserved word in Ingres database
by jtech (Sexton) on Feb 22, 2019 at 15:23 UTC
    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 :/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1230391]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found