Parsing SQL Statements and retaining comments



Friends,

I'm trying to parse my sql statements and i've to retain the
indentation and the comments in the SQL statements. Currently \n, \t
and \* are parsed as special tokens.

Any help on how to retain the comments and indentation after
parsing ??

Thanks in advance

Regards,
SQL Pgmr

.



Relevant Pages

  • Re: Checking each item in m.group()?
    ... Don't build SQL statements as strings; you are enabling the next SQL ... Don't use regular expressions to parse a CSV file. ...
    (comp.lang.python)
  • Sort-of parse SQL
    ... I get SQL statements that include columns which aren't real columns and need ... I'm looking for a way to parse the sql to find these columns ... Prev by Date: ...
    (microsoft.public.dotnet.framework.adonet)