james zhou wrote:
>
> Hi, in the project I am currently working on I need to parse a SQL
> SELECT statement so that I can get all the selected elements in the
> query. For example I need to parse the following stmt:
>
> ...
>
> In the above example, "SUBSTR(ACCT_USAGE_DETAIL_GUIDE_VIEW.C1,1,60) AS
> KEY" is the first element, and "ACCT_USAGE_DETAIL_GUIDE_VIEW.BEGINTS"
> is the second element, so on and so forth. Apparently I cant use comma
> as delimiter to break down the elements. Can anyone shed some lights
> on this?
No problem. Elements in the list are separated by commas which are not enclosed in
parentheses or quotes (single or double). This syntax is common to many languages.
--
Lee Fesperman, FirstSQL, Inc. (
http://www.firstsql.com)
================================================== ============
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (
http://www.firstsql.com)