in reply to how do i construct a sql select statement, where i want to get the where clauses out of an array

Two solutions.

The first is to do:

my $ids_in = join ", ", @in; my $sql = "select id, size from table where id in ($ids_in)";
The other is to put the ID's into a temp table and join on the temp table.

UPDATE
Forgot some silly parens. Thanks runrig.

  • Comment on Re (tilly) 1: how do i construct a sql select statement, where i want to get the where clauses out of an array
  • Download Code