Sisilla:
> How do I insert a date value of 5 days after the current date to a column
> called 'responseDate' in a table called 'quotationRequest'? Perhaps, it
> would be similar to the following?-:
> 
> INSERT INTO quotationRequest (responseDate) VALUES (DATE(current_date + 5
> DAYS))
> 
> I appreciate any effort to help me. Thank you for your time and
> consideration.

I don't think Derby provides this in SQL - but Java provides this in the
API:

ps = connection.prepareStatement("INSERT INTO quotationRequest (responseDate) 
VALUES (?)");

Date responseDate = (new GregorianCalendar()).add(Calendar.DAY_OF_MONTH, 
5).getDate();

ps.setDate(1, responseDate);
rowsChanged = ps.executeUpdate();

Kinda hackish, might not be correct or do exactly what you want, but you
get the idea. =)

(Note that the calendar classes in java.util are known for being...
somewhat eccentric. Cavet emptor. =)

-- 
Anders Morken

My opinions may have changed, but not the fact that I am right!

Reply via email to