After successfully parse input sql script, you can find all sql statements in TGSqlParser.SqlStatements.
You can modify or replace elements in sql statement in 3 levels using one property: AsText.
Level 1: statement level.
By setting AsText to a new value, you change whole sql statement.
Level 2: clause level.
By setting AsText of different sql clause, you change text of that sql clause only, and call TCustomSqlStatement.AsText to rebuild sql statement.
Level 3: source token level.
By setting AsText of TSourceToken, you can change the text of source token.
And please note that, set AsText at high level will override value set to low level.
Gudu software http://www.sqlparser.com
|
Send comments about this topic.
|