in reply to Re^4: Multiple queries on DBI corresponding to multiple csv files?
in thread Multiple queries on DBI corresponding to multiple csv files?
Cool, this new approach allows filtering the $id on the temp table now :)
So, use the place holder "WHERE open = ?" it is not necessary anymore for all the selects statement but, still necessary for those selects that use a different table than the temp one. And this is taking me back to avoid placeholders in the queries again.
Is there any better approach for those mix of selects that came from the temp table and those ones that came from another table?
[1,"DECLARE GLOBAL TEMPORARY TABLE SESSION.temp SELECT name,id FROM mytable WHERE id=$id ON COMMIT PRESERVE ROWS WITH NORECOVERY"], [2,"SELECT name FROM SESSION.temp salary >= 1","csvfile1_$id.csv"], [2,"SELECT id FROM mytable2 WHERE id=$id AND salary >= 2","csvfile2_$id.csv"],
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Multiple queries on DBI corresponding to multiple csv files?
by poj (Abbot) on Feb 25, 2019 at 12:52 UTC |