diff --git a/jOOQ/src/main/java/org/jooq/impl/Val.java b/jOOQ/src/main/java/org/jooq/impl/Val.java index 1eeca1feaa..82c4c9f0b4 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Val.java +++ b/jOOQ/src/main/java/org/jooq/impl/Val.java @@ -372,14 +372,9 @@ class Val extends AbstractField implements Param { // escape syntax else if (type == Date.class) { -// // Sybase ASE needs explicit casting to DATE -// if (dialect == ASE) { -// context.sql(field("{d '" + val + "'}").cast(Date.class)); -// } - // The SQLite JDBC driver does not implement the escape syntax // [#1253] SQL Server and Sybase do not implement date literals - if (asList(SQLITE, SQLSERVER, SYBASE).contains(dialect)) { + if (asList(ASE, SQLITE, SQLSERVER, SYBASE).contains(dialect)) { context.sql("'").sql(val.toString()).sql("'"); } @@ -395,14 +390,9 @@ class Val extends AbstractField implements Param { } else if (type == Timestamp.class) { -// // Sybase ASE needs explicit casting to DATETIME -// if (dialect == ASE) { -// context.sql(field("{ts '" + val + "'}").cast(Timestamp.class)); -// } - // The SQLite JDBC driver does not implement the escape syntax // [#1253] SQL Server and Sybase do not implement timestamp literals - if (asList(SQLITE, SQLSERVER, SYBASE).contains(dialect)) { + if (asList(ASE, SQLITE, SQLSERVER, SYBASE).contains(dialect)) { context.sql("'").sql(val.toString()).sql("'"); } @@ -425,7 +415,7 @@ class Val extends AbstractField implements Param { // The SQLite JDBC driver does not implement the escape syntax // [#1253] SQL Server and Sybase do not implement time literals - if (asList(SQLITE, SQLSERVER, SYBASE).contains(dialect)) { + if (asList(ASE, SQLITE, SQLSERVER, SYBASE).contains(dialect)) { context.sql("'").sql(val.toString()).sql("'"); }