Hi there
I am writing an script to update a set of tables. I need to insert DATE1 in one column and the date just before in another, lets say DATE2.
Code appears as follows:
PROMPT Please enter the required date;
ACCEPT DATE1 DATE PROMPT 'Date: ';
PROMPT The date will be set to &DATE1
PROMPT
UPDATE Table1
SET D1_DATE = '&DATE1',
D2_DATE = '&DATE1' - 1;
The calculation does not return the date I need - DATE2 stays the same as DATE1. Do I need to use some kind of data conversion statement??? Am I approaching this right in the first place?
Help would be appreciated!
Cheers
I am writing an script to update a set of tables. I need to insert DATE1 in one column and the date just before in another, lets say DATE2.
Code appears as follows:
PROMPT Please enter the required date;
ACCEPT DATE1 DATE PROMPT 'Date: ';
PROMPT The date will be set to &DATE1
PROMPT
UPDATE Table1
SET D1_DATE = '&DATE1',
D2_DATE = '&DATE1' - 1;
The calculation does not return the date I need - DATE2 stays the same as DATE1. Do I need to use some kind of data conversion statement??? Am I approaching this right in the first place?
Help would be appreciated!
Cheers