I am working on a Java application that perform query on the DB using JDBC and I have the following problem with a very simple update query.
So I have this query (acytually incomplete):
sb.append("UPDATE coda_tx c SET c.FK_STATO = ");
sb.append(newStatus);
sb.append(",c.DATA_OUT = ");
sb.append(???)
sb.append(" WHERE c.PK_CODA = ");
sb.append(pkCoda);
So this query have simple to update 2 fields of the coda_tx table.
The FK_STATO field update is not a problem (it is update with a string and it works fine, I tryied in a previous query verion) but I don't know how to correctly update the DATA_OUT field that is a DATE SQL field.
In the specific I have that it is updated with the sysdate, it say:
- CODA_TX.data_out = sysdate
So I think that it have to be update with the current date retrieved from Java. Is it right or am I missing something? What exactly is this sysdate? How can I correctly retrieve and use it?
What hava I to put instead the ??? into sb.append(???) to update the field?
Tnx