in reply to Looping over multiple queries

"execute very similar queries several times"

See "placeholders" in perldoc DBI" or use Super Search or even peruse the SQLite documentation and -- if this is not a long-running job -- feed the vars, as needed, from a lookup table or from the CLI.

"brute force way"

...may be less than optimum (in terms of speed, if that's an issue); see this re Transactions -- which may be relevant (or not)/

Replies are listed 'Best First'.
Re^2: Looping over multiple queries
by DStaal (Chaplain) on Jan 29, 2010 at 14:35 UTC

    Placeholders don't work in this context: They can only be used to specify values, not fields. (Change the values, and you have the same SQL statement with a minor parameter change. Change the fields, and you have a very different SQL statement, as far as most databases are concerned.)