ORA-00904: "DATEADD": invalid identifier
890478Oct 12 2011 — edited Oct 12 2011Hi everyone, i am not sure whether this is the right place to post this but i have a problem to ask.
select * from openquery(serverlinkeodwmain, 'SELECT COUNT(CNTR_N) cnt FROM OPS_DLY_AGING_DTL
WHERE BATCH_ID = DateADD(day , datediff(day, 0, getdate()), 0)')
i am trying to get this code to work but i seem to keep getting the error:
OLE DB provider "MSDAORA" for linked server "serverlinkeodwmain" returned message "ORA-00904: "DATEADD": invalid identifier
".
is it because dateadd is sql and not oracle?
please help. i am a noob at this.