Hello there,
I need to create a SQL command that validates a DATE field with value 0000-00-00 in the file "config.properties" of the jRDC2 server
I have already tried in different ways:
a) sql.select_ctacte_saldo_clie=Select Sum(SALDO) as SALDO From CLIENTE Where FECHAEGRE='0000-00-00'
b) sql.select_ctacte_saldo_clie=Select Sum(SALDO) as SALDO From CLIENTE Where FECHAEGRE=”0000-00-00”
c) sql.select_ctacte_saldo_clie=Select Sum(SALDO) as SALDO From CLIENTE Where FECHAEGRE=0
They all return the following error:
<title>Error 500 java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date</title>
I have also tried with:
a) sql.select_ctacte_saldo_clie=Select Sum(SALDO) as SALDO From CLIENTE Where FECHAEGRE=null
In this case no error, but it does not bring any record
The FECHAEGRE field in the database can have the value 0000-00-00 or a date in YYYY-MM-DD format, for example: 2021-09-05
How should I create the SQL command so that it filters all the fields with FECHAEGRE = 0000-00-00?
Greetings and thanks!
I need to create a SQL command that validates a DATE field with value 0000-00-00 in the file "config.properties" of the jRDC2 server
I have already tried in different ways:
a) sql.select_ctacte_saldo_clie=Select Sum(SALDO) as SALDO From CLIENTE Where FECHAEGRE='0000-00-00'
b) sql.select_ctacte_saldo_clie=Select Sum(SALDO) as SALDO From CLIENTE Where FECHAEGRE=”0000-00-00”
c) sql.select_ctacte_saldo_clie=Select Sum(SALDO) as SALDO From CLIENTE Where FECHAEGRE=0
They all return the following error:
<title>Error 500 java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date</title>
I have also tried with:
a) sql.select_ctacte_saldo_clie=Select Sum(SALDO) as SALDO From CLIENTE Where FECHAEGRE=null
In this case no error, but it does not bring any record
The FECHAEGRE field in the database can have the value 0000-00-00 or a date in YYYY-MM-DD format, for example: 2021-09-05
How should I create the SQL command so that it filters all the fields with FECHAEGRE = 0000-00-00?
Greetings and thanks!