in reply to Parse and change an SQL statement

How about SQL::Translator (https://metacpan.org/module/SQL::Translator) ?

Replies are listed 'Best First'.
Re^2: Parse and change an SQL statement
by GrandFather (Saint) on Mar 19, 2012 at 22:06 UTC

    As documented out of the box SQL::Translator only handles CREATE and ALTER statements. The OP gave a SELECT statement as a specific example so the suggested module is unlikely to fit the bill.

    True laziness is hard work
      Oh right, I missed that distinction.