2016-06-27 11 views
0

Ich suche ein Datum von jqGrid in Timestamp Variable in Postgres-Datenbank. Vom Raster aus sende ich die Suchoption 'op' - 'like' und searchtype als 'string'.Fehler bei der Suche nach ähnlichen Datum im Zeitstempel Postgrad

Ich bekam folgende Stacktrace.

Caused by: org.postgresql.util.PSQLException: ERROR: function lower(timestamp without time zone) does not exist 
Hint: No function matches the given name and argument types. You might need to add explicit type casts. 
Position: 359 
at  org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) ~[postgresql-9.1-901.jdbc4.jar:na] 
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) ~[postgresql-9.1-901.jdbc4.jar:na] 
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) ~[postgresql-9.1-901.jdbc4.jar:na] 
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500) ~[postgresql-9.1-901.jdbc4.jar:na] 
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) ~[postgresql-9.1-901.jdbc4.jar:na] 
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273) ~[postgresql-9.1-901.jdbc4.jar:na] 
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) ~[c3p0-0.9.1.2.jar:0.9.1.2] 
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final] 
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final] 
at org.hibernate.loader.Loader.doQuery(Loader.java:802) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final] 
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final] 
at org.hibernate.loader.Loader.doList(Loader.java:2542) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final] 
... 72 common frames omitted 

Antwort

0

lower(text) macht Text niedrigen Fall. Sie können den Zeitstempel nicht als. versuchen Sie stattdessen lower(timestamptz_column::text) oder verwenden Sie to_char für spezifisches Format

+0

danke für die Antwort, aber ich suche Datumswert in Timestamp Variable. Also suche ich mit LIKE-Option, Wie ändere ich meine Abfrage? – G555

+0

zeigen die qwer? .. –

+0

SELECT * FROM InfoHeader i INNER JOIN Standort l WHERE i.cCode = 1 UND i.dCode = 1 UND i.posteddate wie '2016-06-27' – G555

Verwandte Themen