File tree 2 files changed +14
-0
lines changed
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement/select
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -427,6 +427,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
427
427
("CURRENT" ( "_" | (" ")+ ) "TIMESTAMP")
428
428
| ("CURRENT" ( "_" | (" ")+ ) "TIME")
429
429
| ("CURRENT" ( "_" | (" ")+ ) "DATE")
430
+ | ("CURRENT" ( "_" | (" ")+ ) "TIMEZONE")
430
431
) ( "()" )?>
431
432
| <K_TIMEOUT:"TIMEOUT">
432
433
| <K_TRIM:"TRIM">
Original file line number Diff line number Diff line change
1
+ package net .sf .jsqlparser .statement .select ;
2
+
3
+ import net .sf .jsqlparser .JSQLParserException ;
4
+ import net .sf .jsqlparser .test .TestUtils ;
5
+ import org .junit .jupiter .api .Test ;
6
+
7
+ public class DB2Test {
8
+ @ Test
9
+ void testDB2SpecialRegister () throws JSQLParserException {
10
+ String sqlStr = "SELECT * FROM TABLE1 where COL_WITH_TIMESTAMP <= CURRENT TIMESTAMP - CURRENT TIMEZONE" ;
11
+ TestUtils .assertSqlCanBeParsedAndDeparsed (sqlStr , true );
12
+ }
13
+ }
You can’t perform that action at this time.
0 commit comments