Hi i have the following sql query
SELECT
@weekenddtm = CONVERT(VARCHAR,DATEADD(DD,(7 - DATEPART(DW,@p_end_dtm)),@p_end_dtm),111)
and i tried converting it into oracle using this query
v_weekenddtm := CAST(p_end_dtm + NUMTODSINTERVAL((7-TO_NUMBER(TO_CHAR(p_end_dtm,'D'))),'DAY') AS DATE);
but it is giving me error..any idea how to go ahead