Проблемы преобразования запросов Oracle в SQL
Dear All, can someone please help to convert the following oracle query to sql specific please.. as i am really struggling with that .. SELECT "SAMPLE"."ID_NUMERIC", "SAMPLE"."BATCH_NO", "SAMPLE"."STATUS", "SAMPLE"."RECD_DATE", "SAMPLE"."DATE_AUTHORISED", "SAMPLE"."TEMPLATE_ID", "SAMPLE"."RELEASE_DATE", "SAMPLE"."LOGIN_DATE", "SAMPLE"."DATE_COMPLETED", TRUNC((((86400 * (DATE_COMPLETED-RECD_DATE))/60)/60)/24) AS VC_Days, TRUNC(((86400 * (DATE_COMPLETED-RECD_DATE))/60)/60) - (24 * (TRUNC((((86400 * (DATE_COMPLETED-RECD_DATE))/60)/60)/24))) AS VC_Hrs, TRUNC((86400 * (DATE_COMPLETED-RECD_DATE))/60) - (60 * (TRUNC(((86400 * (DATE_COMPLETED-RECD_DATE))/60)/60))) AS VC_Min, TRUNC(86400 * (DATE_COMPLETED-RECD_DATE)) - (60 * (TRUNC((86400 * (DATE_COMPLETED-RECD_DATE))/60))) AS VC_Sec, TRUNC((((86400 * (RELEASE_DATE-RECD_DATE))/60)/60)/24) AS VR_Days, TRUNC(((86400 * (RELEASE_DATE-RECD_DATE))/60)/60) - (24 * (TRUNC((((86400 * (RELEASE_DATE-RECD_DATE))/60)/60)/24))) AS VR_Hrs, TRUNC((86400 * (RELEASE_DATE-RECD_DATE))/60) - (60 * (TRUNC(((86400 * (RELEASE_DATE-RECD_DATE))/60)/60))) AS VR_Min, TRUNC(86400 * (RELEASE_DATE-RECD_DATE)) - (60 * (TRUNC((86400 * (RELEASE_DATE-RECD_DATE))/60))) AS VR_Sec, TRUNC((((86400 * (DATE_AUTHORISED-DATE_COMPLETED))/60)/60)/24) AS CA_Days, TRUNC(((86400 * (DATE_AUTHORISED-DATE_COMPLETED))/60)/60) - (24 * (TRUNC((((86400 * (DATE_AUTHORISED-DATE_COMPLETED))/60)/60)/24))) AS CA_Hrs, TRUNC((86400 * (DATE_AUTHORISED-DATE_COMPLETED))/60) - (60 * (TRUNC(((86400 * (DATE_AUTHORISED-DATE_COMPLETED))/60)/60))) AS CA_Min, TRUNC(86400 * (DATE_AUTHORISED-DATE_COMPLETED)) - (60 * (TRUNC((86400 * (DATE_AUTHORISED-DATE_COMPLETED))/60))) AS CA_Sec, TRUNC((((86400 * (DATE_AUTHORISED-RECD_DATE))/60)/60)/24) AS VA_Days, TRUNC(((86400 * (DATE_AUTHORISED-RECD_DATE))/60)/60) - (24 * (TRUNC((((86400 * (DATE_AUTHORISED-RECD_DATE))/60)/60)/24))) AS VA_Hrs, TRUNC((86400 * (DATE_AUTHORISED-RECD_DATE))/60) - (60 * (TRUNC(((86400 * (DATE_AUTHORISED-RECD_DATE))/60)/60))) AS VA_Min, TRUNC(86400 * (DATE_AUTHORISED-RECD_DATE)) - (60 * (TRUNC((86400 * (DATE_AUTHORISED-RECD_DATE))/60))) AS VA_Sec FROM "SAMPLE" MAzeem
Что я уже пробовал:
не знаю, как преобразовать это в sql one