A little more background; the project I'm working on is classifying specific chunks of data (database, table, columns, etc.) from queries used in our ColdFusion environment. I chose ANSI just because it should cover all of our different JDBC connections (Oracle 9i, DB2, SyBase, TeraData, etc.). The DUAL actually works in the query; changing 1 to a fake column name parses correctly. Since it's possible (although somewhat pointless) to include a static value in a column definition I was hoping that there might be some way to get the parser to recognize that the column name comes after the AS. SELECT [static_value1] [AS] c1, [static_value2] [AS] c2, ... cn
The DUAL was just used as an example as we have many queries which include staticly defined values. I guess the fastest solution will be to strip out anything which may be a static define.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|