Sort-of parse SQL



I get SQL statements that include columns which aren't real columns and need
to be removed. I'm looking for a way to parse the sql to find these columns
and get the condition that may be associated with it. I know I can use
NOEXEC or PARSEONLY in SqlServer but it will only tell me if there is an
error.

For example:

select col1, col2, col3 from my table where ThisIsNotARealColumn > 11 and
....

ThisIsNotARealColumn is really the name of an expression column which is
defined elsewhere that I want to apply to the DataTable after the results
have been returned.



.



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)
  • Parsing SQL Statements and retaining comments
    ... I'm trying to parse my sql statements and i've to retain the ... Any help on how to retain the comments and indentation after ... SQL Pgmr ...
    (comp.compilers.tools.javacc)
  • Re: Help with DELETE Statement
    ... Perfect - Thanks for pointing me in the right direction. ... > That BETWEEN structure can be used with SQL statements, ... >> formatting this incorrectly? ... Prev by Date: ...
    (microsoft.public.fox.helpwanted)
  • Re: Running Concurrent SQL statements
    ... they are not long running queries. ... When I run the process twice at the same time, ... sql statements still take the same time to run, ... Prev by Date: ...
    (comp.databases.btrieve)
  • Re: Combo boxes that delete
    ... Being that I am pretty new to sql statements I was shocked and amazed ... Thank you so much Doug. ... You rock!!! ... Prev by Date: ...
    (comp.databases.ms-access)