version history of general sql parser: ====================================== Version 2.2.6 (Jan 16, 2013) * [plsql] better support of nest records and objects * able to parse main body of create table/index only, ignore other properties. * [DB2] able to regonize comment command * [DB2] improved support alter table set data type * [DB2] support alter table rename column * [Oracle] support xmlroot, XMLSERIALIZE, XMLELEMENT and XMLATTRIBUTES. * [Oracle] support multiset subquery * [plsql] support aggregate using schema.implemmention_type in create function statement * [plsql] support dblink in typename * [plsql] support range clause in subtype clause * [plsql] support varchar, string datatype in INDEX BY clause ====================================== Version 2.2.5 (Jan 03, 2013) * Support VCL 64 bit for Delphi XE3 * fix a build sql error * Fix a bug can't recognize cte table correctly if it's inside stored procedure. * [Oracle] support truncate table statement * [DB2] support truncate table statement * [Oracle] support enable keyword at the end of alter table statement * [Oracle] fix a tokenize error to support literal like this: '\''' * [Oracle] support case expression in open cursor statement * [SQL Server] support Compound Assignment Operators in set clause of update statement. * [SQL Server] change ^= to a Compound Assignment Operator * support cte with merge statement * Able to check whether a column is linked to table without guessing by introducing a new property isTableDetermined in TSourceToken. * [PLSQL] make EXECUTE IMMEDIATE statement accessible * [PLSQL] fix a bug while moving EXECUTE to reserve keywords list * [PLSQL] support EXECUTE IMMEDIATE statement in for all statement. * able to check syntax error in in_expr * [MySQL] make binary operator higher precedence. * modify function TLzCustomExpression.andor_expr_visit to make it work as designed * able to detect more syntax error for 1. Select * from table1 where column1 between 1=1 and 1=1 2. Select * from table1 where column1 between 1=1 and 1 3. Select * from table1 where column1 between 1 and 1=1 4. Select * from table1 where (asdf) 5. Select * from table1 where asdf(asdf) 6. Select * from table1 where (select * from test) 7. Select * from table1 where col1=1 and asdf 8. Select * from table1 where asdf and col1=1 9. Select * from table1 where asdf and asdf 10. Select * from table1 where asdf or asdf * make ^= a comparison operator in oracle,mssql,mysql,db2,access ====================================== Version 2.2.4 (July 18, 2012) * [format option] gfmtopt.TrueLeft make sure all keywords align left including AND/OR keyword in where clause and join condition. * [DB2] fix a bug can't process if statement correctly inside block. * fix a bug can't detect syntax error in this statement: insert into t(f1,f2,f3) values(v1,v2 v3) * able to detect syntax error in where clause like this: select * from tab1 where asdf ====================================== Version 2.2.3 (June 26, 2012) * [MySQL] fix an error missing semicolon(;) in the end of drop table statement and create table statement. * [MySQL] fixed a BuildSql error of TMySQLSet * [MySQL] support into clause like: SELECT COUNT(*) FROM tmpT INTO variablename; * [MySQL] add support for [DEFINER = { user | CURRENT_USER }] in create procedure statement * [MySQL] support multi-list of characteristic such as READS SQL DATA in create procedure statement * [MySQL] add support for [DEFINER = { user | CURRENT_USER }] and [SQL SECURITY { DEFINER | INVOKER }] in create view statement. * [MySQL] able to format create view statement * [MySQL] select statement in group_concat function was parsed * [Oracle] enhanced to handle subquery in plsql * able to detect syntax error for condition like this: where column1<1=1 * able to access detailed sql query structure of Oracle insert all statement. * [plsql] support create package body with empty statements inside. * [plsql] better support select with parenthesis in plsql. * [plsql] support label before function call statement * [plsql] support expr in execute immediate clause * [ms access] #11/20/2011# was treated as a constant instead of an identifier * [DB2] fix a bug that CheckAsTextAfterRebuild will generate duplicated text * [DB2] able to support begin...end block syntax * able to detect condition semantic error like where column1=1=1 * [ms access] able to parse expression like this (dbo_Transactions.PostDate)=#11/20/2011# * [Oracle] support model clause, able to parse and format, but no detailed clause information was available publicly. * [Oracle] support siblings keyword of order by clauses. * [Oracle] support use of an IN keyword followed by a string literal like source_entity_cd IN 'D7' * [Oracle] A fully-qualified column of the inline view can be used in IN condition * [sql server] support SQLCMD variable by treat it as an identifier * [Oracle] able to parse the Package Declaration and Package Body is written in the same file, without need to be separated by delimiter character * [sql server] able to take $(variableName) syntax as a variable name. * fix a bug can't link column to table correctly if table hint after table alias * [sql server] add support to link all columns to temporary table * [new format options] gfmtopt.Parameters_align_datatype * [new format options] gfmtopt.Select_FromclauseJoinConditionInNewline * [new format options] gfmtopt.update_set_clause_inNewLine * [new format options] gfmtopt.update_from_clause_inNewLine * [new format options] gfmtopt.case_builtinfunc * [DB2] support CTE query in create view statement. * [Oracle] support multi table insert. ====================================== [version 2.2.2][2012-05-14] * Support MDX. * [pretty print] format privot table in a more readable layout * [pretty print] format AnalyticFunction in a more readable layout * [pretty print] rewrite algorithm for begin_no_format/end_no_format * [pretty print] new format option:gfmtopt.AlignAndOrWithOnInJoinClause, able to align AND/OR keywords with ON in join clause * [pretty print] new format option:gfmtopt.expr_concat_string_max_length, format string concat expression into a more readable format. * [pretty print] new format options: gfmtopt.CaseWhenInSamelineAsCase , gfmtopt.CaseThenExprInNewline , gfmtopt.CaseElseExprInNewline make case expression in a new layout. * [pretty print] new format options: gfmtopt.BEStyle_createtable_leftBEIndentSize gfmtopt.BEStyle_createtable_rightBEIndentSize gfmtopt.Createtable_Fieldlist_Comma_option gfmtopt.Createtable_Fieldlist_Style these format options apply to declare table as well. * [pretty print] new format option: gfmtopt.Insert_Columns_Per_line This format option make it much easy to link value to column in insert statement. if there is a subquery in insert statement, select list also effected by this option no matter what's value of Select_Columnlist_Style was set. * [pretty print] new format options: gfmtopt.WhereClauseAlignExpr, align expression in where clause * [pretty print] new format options: gFmtOpt.AlignAliasInFromClause, align table alias in from clause. * [DB2] support alter table alter column drop identity|default * [db2] support alter table drop column. * [db2] case keyword can be used as table name. * [MySQL] support is [not] [false|true] predicate * [sqlserver] support real number 0xabc in updatetext * Rewrite procedure TCustomSqlStatement.ReBuildSql(pFlags: TRebuildFlags); in order to fix bug that use lots of memory which cause Very Slow Performance of Rebuild query with 100 SQL variables in ASP.NET application * [msaccess] support alter table add column. * add TGSqlParser.OnMetaDatabaseTableColumn, user can provide meta information of database to help SQL parser to determine relationship between column and tables. * [oracle/plsql] support keyword ARRAY as type name. * [oracle/plsql] fixed a bug can't parse select statement in plsql if there is a ) before order by clause. * [oracle/plsql] support object access method in using clause. * fix a bug that onFieldToken event fired twice for a column in create table statements * [mysql] support multi \ escape character in literal ====================================== [version 2.2.0][2012-02-27] * able to pretty print big script without out of memory exception. * fix a bug doesn't support sql server OPENDATASOURCE syntax. * fix a bug doesn't support MySQL b'0' literal * support sql server create trigger of ddl * support with clause in insert statement of sql server * support sql server xml data type * support WITH(HOLDLOCK) in merge statement * introduce TLzTable.withBeforeAlias and TLz_TableRef._withBeforeAlias * support GRANT EXECUTE ON OBJECT::G2.GetAssetTagComponentMap TO public * supprt OPTIMIZE FOR query hint * support exists subquery in if updated() column * add support for WITH (TABLOCKX) * support alter index of SQL Server * support variable in merge into name * fix a memory leak bug. * able to provide a TSelectSqlStatement for the third parameter of the OPENROWSET as well as the full AsXmlText for a TSelectSqlStatement * support error as table alias * [ms access] support Precision of text data type * [sql server] support NOT FOR REPLICATION clause in reference clause * [sql server] support string variable while Execute a character string [version 2.1.9][2011-12-27] * support - character in DB2 identifier * support parenthesis in the left side of set clause of DB2. * rename unit dbcmds to lzdbcmds. * support sql server deny statement * support sql statement that block statement that follow declare statement directly. * support FETCH FIRST ROW ONLY * fixed a bug which will slow down the parse( and even freeze the parse) when the table name is a big query * add %prec OUTER_JOIN to rule joined_table, so all of those table_ref XXX RW_JOIN table_ref have the same priority, this make following sql organized correctly: SELECT * FROM S1 natural join w3 LEFT OUTER JOIN S2 ON S1.S = S2.S * new format options: gfmtopt.declare_list_style, gfmtopt.declare_comma_option, gfmtopt.LinebreakBeforeParamInExec replaced by gfmtopt.exec_first_paramater_in_newline gfmtopt.exec_parameters_style gfmtopt.exec_parameters_comma_option gfmtopt.exec_parameters_align_value * fix a bug that can't modify case of quoted identifier of table/column/alias * make the result xml of group by clause is same in GroupbyClause.AsXmlText vs. parser.XmlText * Able to access view alias by introduce a new property TCreateViewSqlStatement.AliasClause which is type of _TOracleViewAliasClause * TSourceToken.DBObjType of plsql package, procedure and funtion set correctly. * support delete clause in merge_update_clause of merge statement: * fix a bug that in DB2 insert value clause, all list was treated as a single expression. * fix a bug that merge statement inside begin...end block was not handled * support interval expression in plsql * support BULK COLLECT INTO clause of EXECUTE IMMEDIATE [version 2.1.5][2011-08-01] * Bug the bug that can't format PLSQL correctly. * MS access, fully support DROP TABLE statement. * star (*) was treated as a column name of t in this SQL: select * from t * add new format option: gfmtopt.Subquery_Newline_After_IN, gfmtopt.Subquery_Newline_After_EXISTS gfmtopt.Subquery_Newline_After_ComparisonOperator gfmtopt.Subquery_Newline_Before_ComparisonOperator * add support for sybase: create join index, drop join index in sql server engine * Oracle: support DETERMINISTIC keyword in function specification when create package. [version 2.1.3][2011-06-07] * at least 2x faster than previous version. * fix a bug when search table/column relations in subquery with union set operation. * arguments in analytic Function processed correctly. * if there are syntax errors in some SQL statements in a script, other valid SQL statements will be formatted. * SQL server lexer was enhanced to handle string that not ended correctly. [version 2.1.1][2011-04-27] * fix a bug that gfmtopt.GroupByClauseInNewline (Group by Clause in New Line) checked, but the formatted code still has the “GROUP BY” and the first group level on the same line. * fix a bug that format this sql will raise Access violation: ; WITH CTE AS (SELECT '1' As Something)SELECT * FROM CTE; * able to correctly indent Begin / End in Trigger Statement by setting gfmtopt.BEStyle_Block_leftBEIndentSize * able to format case expression inside convert function. * Don't stack parameters in RAISERROR. * new format option: gfmtopt.Insert_Indent_Select, indent the SELECT statement following an INSERT INTO, default is false. * better format of nested if else statement. [version 2.0.10][2011-04-19] * support identifier in microsoft access that start with digit 0-9. * support alter view sql statement of sql server database. * support float constant in oracle like 1.57F * support multi-field list in microsoft access delete statement like this: DELETE Table1.*, Table1.ID, Table1.Field1, Table1.Field2 FROM Table1 WHERE (((Table1.Field1)="ABC")); * query size limitation in trial version was increased to 10000 characters which is adequate to evaluate for the most sql script. [Java version 1.2.0][2011-04-14] * rewrite all demos. * add some public getter functions of TAlterTableOption. * [changes] replace following integer constant with enum type: EJoinType // join type public static int join_cross = 1; public static int join_natural = 2; public static int join_full = 3; public static int join_left = 4; public static int join_right = 5; public static int join_fullouter = 6; public static int join_leftouter = 7; public static int join_rightouter = 8; public static int join_inner = 9; public static int join_crossapply = 10; public static int join_outerapply = 11; public static int join_straight = 12; public static int join_union = 11; public static int join_nested = 20; public static int join_natural_left = 30; //mysql public static int join_natural_right = 32; //mysql public static int join_natural_leftouter = 34; //mysql public static int join_natural_rightouter = 36; //mysql replace following integer constant with enum type: EConstraintType // constraint type public final static int constraint_type_notnull = 1; public final static int constraint_type_unique = 2; public final static int constraint_type_primary_key = 3; public final static int constraint_type_foreign_key = 4; public final static int constraint_type_check = 5; public final static int constraint_type_reference = 6; public final static int constraint_type_default = 7; // valid in sql server public final static int constraint_type_index = 8; //mysql public final static int constraint_type_key = 9; //mysql public final static int constraint_type_fake_null = 8; public final static int constraint_type_fake_collate = 9; public final static int constraint_type_fake_identity = 10; public final static int constraint_type_fake_rowguidcol = 11; public final static int constraint_type_fake_auto_increment = 12 ; //mysql public final static int constraint_type_fake_comment = 13 ; //mysql public final static int constraint_type_fake_db2 = 14 ; //db2 replace following integer constant with enum type: EAlterTableOptionType // TLzAlterTableOptionType public final static int atoAddColumn = 0; public final static int atoModifyColumn = 1; public final static int atoAlterColumn = 2; public final static int atoDropColumn = 3; public final static int atoSetUnUsedColumn = 4; public final static int atoDropUnUsedColumn = 5; public final static int atoDropColumnsContinue = 6; public final static int atoRenameColumn = 7; public final static int atoChangeColumn = 8; public final static int atoRenameTable = 9; public final static int atoAddConstraint = 10; public final static int atoAddConstraintIndex = 11; public final static int atoAddConstraintPK = 12; public final static int atoAddConstraintUnique = 13; public final static int atoAddConstraintFK = 14; public final static int atoModifyConstraint = 15; public final static int atoRenameConstraint = 16; public final static int atoDropConstraint = 17; public final static int atoDropConstraintPK = 18; public final static int atoDropConstraintFK = 19; public final static int atoDropConstraintUnique = 20; public final static int atoDropConstraintCheck = 21; public final static int atoDropConstraintPartitioningKey = 22; public final static int atoDropConstraintRestrict = 23; public final static int atoDropConstraintIndex = 24; public final static int atoDropConstraintKey = 25; public final static int atoAlterConstraintFK = 26; public final static int atoAlterConstraintCheck = 27; public final static int atoCheckConstraint = 28; public final static int atoOraclePhysicalAttrs = 29; public final static int atoOracleLogClause = 30; public final static int atoOracleTableP = 31; public final static int atoMssqlEnableTrigger = 32; public final static int atoMySQLTableOptons = 33; public final static int atoDb2PartitioningKeyDef = 34; public final static int atoDb2RestrictOnDrop = 35; public final static int atoDb2Misc = 36; public final static int atoUnknown = 50; [version 2.0.9][2011-04-13] * TSourceToken.Location can be used to check which clause a column belongs to. * datepart argument in DATEADD, DATENAME,DATEDIFF,DATEPART function wouldn't be recognized as a column name. [Java version 1.1.12][2011-04-12] * MySQL, add syntax support for natual left join, natual left outer join,natual right join,natual right outer join [Java version 1.1.11][2011-04-08] * able to find out what clause a TObjectName belongs to. * [changes]introduce a new enum: ESqlClause replace following integer constant in TBaseType public final static int unknownClause = 0; public final static int selectClause = 1; public final static int whereClause = 2; public final static int havingClause = 3; public final static int groupbyClause = 4; public final static int orderbyClause = 5; public final static int joinCondition = 6; public final static int joinClause = 7; public final static int hierarchicalClause = 8; public final static int computeClause = 9; public final static int topClause = 10; public final static int outputClause = 11; public final static int loc_deletestmt = 12; public final static int loc_updatestmt = 13; public final static int loc_insertstmt = 14; public final static int updateSetClause = 15; public final static int insertColumnClause = 16; public final static int insertValuesClause = 17; public final static int intoClause = 18; public final static int qualifyClause = 19; public final static int sampleClause = 20; public final static int teradataWithClause = 21; public final static int limitClause = 22; public final static int valueClause = 23; * support Oracle MULTISET operator [Java version 1.1.10][2011-04-06] * support Oracle translate function, qualified type name in Oracle sql. * support Oracle treat function. * support Oracle extract(XML) function, introduce new funtion type: TFunctionCall.fntExtractXML [Java version 1.1.9] * support Oracle syntax like this: update zzz set (id) = (select 1, 'Test' from dual); * Type keyword can be column name in update statement. * fix a bug can't handle comment like this where clause: 2= 1/*Comment*/+1; * support deterministic keyword in function declaration. * support java language call specification in plsql function declaration. * support => operator in open statement * support inner procedure in procedure declaration of Oracle PLSQL [version 2.0.7] * Fix a bug that SQL statement inside plsql block will be visited twice when iterate SQL statement using visitor pattern. [Java version Java 1.1.7] * Fix a bug that not handle set/create index/alter table statement in sql server block. [.NET version 2.0.6] * [2011-03-30][oracle, format option] gfmtopt.BEStyle_Function_BodyIndent was replaced by BEStyle_BlockIndentSize [Java version 1.1.3][2011-03-16] * Introduce new class: TBlockSqlStatement: base class of all sql statement class that includes multiple sql statement. * Introduce new class: TStoredProcedureSqlStatement: base class of all stored procedure class such as create function/procedure/trigger * Introduce new class: TOracleStoredProcedureSqlStatement: base class of all oracle stored procedure function/procedure/trigger/package/anonymous block * [2011-03-10][MySQL] Support Full-Text Search Functions, Match...AGAINST, [.NET version 2.0.5][2011-03-08] * RTF output, when keep layout, fix a bug can't preserve space before linebreak. * [2011-03-23] Add support for MS Access transform, parameters statement [java version v1.1.3][2011-03-10] * Support MySQL Full-Text Search Functions, Match...AGAINST [java version v1.1.2][2011-03-08] * SQL Server keyword can't be column name. * Add TAliasClause.getColumns() to get columns in alias clause like this: as alias_name(column1,column2) [java version v1.1.1][2011-03-03] * add a demo to illustrate how to use sql parser to prevent sql injection. * view alias name in create view is available in Oracle, sql server, DB2 and MySQL. * change class name from TOracleViewAliasClause to TViewAliasClause TOracleViewAliasItemList to TViewAliasItemList TOracleViewAliasItem to TViewAliasItem * change value of enum ENodeType from T_OracleViewAliasItem to T_ViewAliasItem T_OracleViewAliasItemList to T_ViewAliasItemList T_OracleViewAliasClause to T_ViewAliasClause * fix a bug that expression will be traversed in-correctly in multitimes when call TExpression.postOrderTraverse * fix a bug can't handle comment like this: SELECT a,b /*--*/ FROM YYY version 2.0.4 (2011-02-23) * Support BEGIN;...END; syntax of SQL Server. * Add 3 new format options: gfmtopt.expr_parenthesis_innewline, gfmtopt.expr_remove_redundant_brackets,gFmtOpt.Insert_Parenthesis_in_separate_line * Format comment in parameters declaration of stored procedure was enhanced * Having clause before group by clause in select statement was supported. * Syntax like this in PL/SQL was supported: Insert into g_price_marginal_rule values marginal * Support qualified name like this: dbo.##BondDetail2. * Fully support of SQL Server truncate table. * Tested on .NET framework 4, and fixed a minor bug. * Add a new function lzbasetype.AutoDetectCharacterSet to detect sql file encoding. * Easy to check what's type of sql statement those class were represented by using SqlStatementType of TMssqlIfElse,TMssqlCreateprocedure, TMssqlCreatefunction and TMssqlCreatetrigger. * Introduce a new class: TMssqlDropProcedure * Sql statement in exec_string can be fetch via execute statement's ChildNodes. * Add a new demo: affectedObject to determine affected database objects in sql file. * refine alter option in alter table statement. and add some new code in analyzscript to illustrate how to use this option. * add new property: TLzAlterTableOption._ndColumnName * remove TLzAlterTableOption.ColumnConstraintList * Introduce a new class: TLz_AttrList, represents a list of qualified name * TLzConstraint.ConstraintColumnList was removed, and replaced with ColumnNameList * New property: TLz_Attr.sortToken, this property was used when column names in primary key/foreign key had sort(asc,desc) information.(this is for sql server only) * fix a bug that missing distinct/top clause information in TSelectSqlStatement.GetAsXmlText * [sql server] full support of SQL Server Drop Index statement, and add demo code in analyzescript to show how to use TMssqlDropIndex. [java version v1.1.0][2011-02-20] * 10 times faster if create more than 100 instance of SQL Parser. * All getRightOperand() and getLeftOperand() should return type TExpression if not null, so we remove TParseTreeNode getLeftNode(), TParseTreeNode getRightNode() TInExpr and TExprList shoud be leaf node of a new TExpression * Able to remove colums from select list, and rebuild sql. * Able to add new column to select list, and rebuild sql. * Able to add where clause to select statement. * Able to add order by item, the order by clause must be already exists. * Able to remove an order by item,remove all items means remove the whole order by clause. * Improved API of PL/SQL loop statement. * Parser don't recover from FROM keyword. Java Version 1.0.0 (2011-01-06) * This is the first official released Java version as stable as .NET version, support Oracle, SQL Server, DB2, MySQL, Access, and Teradata. All features in .NET version were available except sql formatter. version 2.0.0 (2011-01-06) * Change license mode to enterprise edition license(support all following database: oracle, sql server, db2, mysql, and enable all developers in a physical site to use this library) and professional edition license(support one of following database: oracle, sql server, db2, mysql, and enable one developer in a physical site to use this library). * If you need to distribute this library together with your application to end users, please contact sales@sqlparser.com for a distribution license. * [Oracle] support comment on statement. * [Oracle] support create synonym statement. * [Oracle] support compress/uncompress clause in physical_properties. * [Oracle] able to get sequence name and options. * [internal] adjust max_matches value to reduce usage of memory, improve performance. version 1.12.17 (2010-12-02) * introduce a new property: TLzField.DisplayName, this property returns alias name of a column if any, otherwise, return column name. * fix bug that TLzField.Name returns a dot before fieldname. * support "not for replication" clause in IDENTITY property of sql server. * intorduce 9 format options gFmtOpt.IntoClauseInNewline gFmtOpt.WhereClauseInNewline gFmtOpt.GroupByClauseInNewline gFmtOpt.OrderByClauseInNewline gFmtOpt.HavingClauseInNewline gFmtOpt.Update_Columnlist_Style gFmtOpt.LinefeedsAndOr_option control and/or keyword in condition before newline or after newline or no linebreak. gFmtOpt.Select_Groupby_Style gFmtOpt.Select_Orderby_Style * Handle "TOP X" the same as "DISTINCT" * [sql server] support Sparse Columns of sql server 2008. * [sql server] support SQL Server 2008 new introduced several extensions to the GROUP BY clause: GROUPING SETS, CUBE, and ROLLUP subclauses of the GROUP BY clause and the GROUPING_ID function. * [sql server] support delete in merge not matched clause. * [sql server] support sql server 2008 HIERARCHYID Data Type * [sql server] support Compound Assignment Operators * [sql server] support new sql server 2008 spatial function like: ([geom].Reduce(10)).STAsText() * [sql server] support the geometry and geography feature of SQL Server 2008. * [oracle] support oracle XMLQUERY sytnax. * able to control format of expression in case expression. * better support to format case expression. * < character in html output not show correctly. version 1.12.15 * fix bug: can't process empty block in SQL Server like this: BEGIN CATCH END CATCH * support SQL Server kill statement. * new tokentype: ttUserCustomized. * new element of TLzHighlightingElement: sfkUserCustomized * new event handle: TGSqlParser.BeforeGenerateFormattedSQL will be fired before generate formatted SQL when a event hanlder was set. it can be useful if you want to change color of some source token work together with ttUserCustomized,sfkUserCustomized please check customizedColor demo shipped together with this library to see how to customize color of certain tokens in RTF and HTML output. * rtf output support multibytes character set language like chinese, korean. * fix a bug in TLzCaseExpression.GetAsXmlText. version 1.12.14 * sql formatter ugly mode, when convert to single line, remove extra spaces in output sql. * support ; character before CTE of SQL Server. version 1.12.13 * support following syntax: IF Update (OrderTypeID) BEGIN end else begin end * able to recognize table alias in delete, update statement correctly. update A set A.text='x' from myTable A join otherTable B on A.Id=B.Id delete A from myTable A join otherTable B on A.Id=B.Id * support readonly keyword in variable declare of SQL Server. * support string like this of ms access: #4/1/2008 3:09:29 PM# * fix a bug that can't find hint in select after comment like this: SELECT /* TEST SQL */ /*+ FULL(EMP) */ EMPNAME FROM EMP WHERE EMPID = 1; * can't handle if statement correctly if there is a case...end(with else) expression inside. * \ character is not a escape char of oracle string literal. * fix a bug that remove space around DEFAULT keyword in following sql when WSPadding_OperatorArithmetic is false. PROCEDURE report_create (v_ts IN DATE, p_msg IN VARCHAR2,p_file_mode IN VARCHAR2 DEFAULT 'A'); * subtype keyword can be a qualified name in plsql. * column datatype can't be empty in create table statement. * default and null keyword can't be a datatype name. * support connect_by_root unary operator in Oracle. * able to detect syntax error of select in cursor declare of plsql. * support mod operator in plsql. version 1.12.11 * support qualified name of SQL Server pivot column. * bug of processing unpivot clause in from clause was fixed. * qualified data type name was supported. * support variable of LANGUAGE @language in CONTAINSTABLE clause. * output can be table alias in insert statement. * html output was checked as XHTML 1.0 Strict. * when convert SQL to vb and vb string builder, change escape char of " from \ to ". * able to handle 0X8000 literal. * able to handle (SELECT Name, ListPrice FROM Production.Product WHERE ProductID = 720) in values clause of insert statement like this: INSERT INTO dbo.MyProducts (Name, ListPrice) VALUES ('Helmet', 25.50), ('Wheel', 30.00), (SELECT Name, ListPrice FROM Production.Product WHERE ProductID = 720); * new format option: gfmtopt.AlignJoinWithFromKeyword. * partially support of sql server merge statement. * MySQL stored procedure such as create function/procedure/trigger can be ended by string like "end;" * start with and connect by clause were formatted correctly. * support return keyword in declare statement of MySQL. * fix a bug when select_columnlist_style = asWrapped, following SQL is not formatted correctly. SELECT last_name,a+(select a,b from c) FROM employees * fix a bug that can't process format option correctly: gfmtopt.FunctionCall_Parameters_Style = stacked * better support to format multiline comments in html and rtf output. * new format option: gfmtopt.FunctionCall_Parameters_Style, gfmtopt.FunctionCall_Parameters_Comma control parameters layout of function call. * new foramt option: gfmtopt.NoEmptyLinesBetweenMultiSetStmts, able to control empty lines between consecutive set/declare statements in sql server. * Unify the way to access statements in plsql statement (TPlsqlStatement) by visiting childnodes. * fix a bug that can't hanlde literal like '%\_INF'. * support concat operator in select list expression of DB2. * Change default value of format option case_identifier from coLowercase to coNoChange; * IDENTITY keyword can't be used as typename, but gsp can't detect this error. * right keyword can be arguments of function of Oracle. * year keyword can be field name of TYPE. * year keyword can be plsql column name like tablename.year%type * RIGHT keyword can be column name in into clause of insert statement of Oracle. * better support to format multiline comments. * support dbms_lobs.open() function of Oracle. * support last_value, first_value function of Oracle. version 1.12.7 * execute statement can be at the top level of plsql script. * Access Violation to process this SQL which is syntax invalid. if select object_id('cr_trd_me_110') is not null drop procedure cr_trd_me_110 version 1.12.6 * improved: yyaction in lzyaccXXXsql unit was splitted into small functions by program utils\split_yyaction\split_yyaction.exe this speed up .NET version under vista (it takes 10 seconds to parse a simple SQL before, now it's about 2-3 seconds) version 1.12.5 * [oracle] fixed: support this syntax: ALTER TABLE _name_of_table MODIFY _name_of_field NUMBER(5,0) * [lex] improved: improve max_matches from 1024*20*10 to 1024*20*10*10, able to deal big quoted string. * [sybase] improved: +1 was supported like this: EXEC Proc "param1", "param2", +1 * [sybase] improved: multitable in drop table. * [mysql] fixed: decimal datatype was supported in cast function. * [oracle] fixed: update clause and insert clause can be optional in merge statement. * [oracle] improved: Able to recovery from a keyword error from plsql by using OnParserTokenError event. version 1.12.4 * fixed: Merge statement table alias is optional. * support syntax: FOR R1 IN C1() LOOP, no parameters in C1(). * type keyword can be in function parameters, variable name in for clause. * support syntax: WHEN NOT MATCHED THEN is preceded by WHEN MATCHED THEN in merge statement. * comment keyword can be used in typename * supported syntax: Lob_storage_clause in column_properties of create_table_properties. * NUMBER(*,0) was supported in create table statement of Oracle. * pipe row statement is supported in create function statement. * pipedlined is supported in create function statement. * improved: all DoParseStatement, DoParse functions return value. * improved: all parse error messages log into top level tcustomsqlstatement. * partially support log clause of create table statement. * support pipedlined in return type of function in create package * supported following Oracle sql syntax: create table tablename tablespace tn nologging parallel as select f from t [2009-11-24][general] fixed: select statement in create table not indent correctly. Remove this duplicate code in p3_linebreak, already exists in p3_subnode if assigned(SelectStmt) then begin selectStmt.ppv3(self,true,gfmtopt.IndentLen,0,nil); end; version 1.12.3 * fixed: TMssqlIfElse.ProcessFuncExpr, infinite loop cause program halt for some sql. * support for "if not update(colid)" in create trigger. version 1.12.2 * method_specifier in create procedure was supported. version 1.12.1 * able to beautify query inside openrowset function. * --begin_no_format align with previous sql statement. * fixed: rtf output can not handle multiline string correctly. * fixed: emptylines between multiline comments and sql statement not handle correctly. version 1.12.0 * able to show line number of formatted sql. * better support for AndOrUnderWhere format option. * support recompile hint in option of SQL Server. select top 10 * from aa option(recompile) * mssql xml method query(),value(),exist(),modify(),nodes() keep lowercase no matter what case option was choosen for function case option. * sql formatter, from keyword in from clause of update statement not in newline. * sql formatter, into clause start in a newline. * better support for --begin_no_format, --end_no_format format directive. version 1.11.1 * support this SQL syntax of Sybase SELECT sinkingtable.Principal FROM kplus..BondsSchedule sinkingtable(INDEX BondsScheduleIdx1) * able to handle drop table statement of DB2. * when emptyline=mergeintoone, insertblanklineinbatchsqls is false, emplty lines after select in create function is removed but not merge into one. version 1.11.0