I have a vbscript that connects to an Oracle Database to retrieve information. Part of the conditional statement is to subtract a number from the current date. I currently have this hard-coded as 1 but want it to be a parameter.
Code is :-
firstSQL = "SELECT txrefnbr||','||msgtype||','||createdate||','||supplierid||','||senderid||','|| " _
& "receiverid||','||direction||','||messagesource||','||tdoemmachk||','||ackfromtdoemma||','|| " _
& "responsetotdoemma||','||ackfromstsemma||','||responsetostsemma||','||stsemmachk||','|| " _
& "messagedest||','||reconciled " _
& "FROM mm_reconcile " _
& "WHERE RTRIM(receiverid) = 'NIE' " _
& "AND reconciled IN ('N', 'F') " _
& "AND createdate < sysdate - 1 "
For the last line instead of saying sysdate -1 I want to have it as sysdate - &x.
Any suggestions as to how I do this ?
Thanks in advance