Oracle SQL - get previous weekday
Code:
SELECT
INVOICE.APINVOICE,
UIS_HISTORY.MODIFIED_BY_
to_date(to_char(UIS_HISTORY.DATE_OF_CHANGE, 'MM/DD/YYYY HH:MI:SS AM'),'MM/DD/YYYY HH:MI:SS AM')
FROM
INVOICE,
UIS_HISTORY
WHERE
( UIS_HISTORY.INVOICE_SYS=INVOICE.INVOICE_SYS_ID )
AND
UIS_HISTORY.DATE_OF_CHANGE=to_date(IF datepart(sysdate,dp_weekday)=1 THEN sysdate-3 ELSE sysdate-1,,'MM/DD/YYYY HH:MI:SS AM')
keeps saying missing right parenthesis!???
so, do you see where? or is this all wrong
Re: Oracle SQL - get previous weekday
Is it because you have two commas together near the end there? I'm not sure what PL SQL allows but I don't think that would be permitted in T-SQL.