SELECT :end_date,
:start_date,
TRUNC (MONTHS_BETWEEN ( :end_date, :start_date) / 12) AS yrs,
TRUNC (MOD (MONTHS_BETWEEN ( :end_date, :start_date), 12)) AS mnts,
TRUNC (:end_date- ADD_MONTHS(:start_date,MONTHS_BETWEEN(:end_date,:start_date)))AS dys,
TRUNC (24 * MOD ( :end_date - :start_date, 1)) AS hrs,
TRUNC (MOD (MOD ( :end_date - :start_date, 1) * 24, 1) * 60) AS mins,
MOD (MOD (MOD ( :end_date - :start_date, 1) * 24, 1) * 60, 1) * 60 AS secs
FROM (SELECT :end_date, :start_date FROM DUAL);
Muhammad Abdul Qaium is a Database Engineer/Oracle Apex Developer/BI Developer (in Connecticut, USA) who is an Oracle Certified Cloud Architect Professional, OCI Autonomous DB specialist as well as Oracle Business Intelligence Foundation Suite 11g Certified Implementation Specialist with extensive expertise in Database design , PL/SQL, Oracle Apex, Microsoft SSIS, ETL, Power BI, Qlik Sense, BI Publisher, Jasper Report, OBIEE. Contact: qaiuminfo@gmail.com
Search This Blog
Monday, November 25, 2019
Wednesday, November 20, 2019
Remove Special Character From A String Using REGEXP_REPLACE
SELECT REGEXP_REPLACE('test'dssdf/sdfs','[^a-z_A-Z ]') FROM DUAL
RESULT : testdssdfsdfs
RESULT : testdssdfsdfs
Subscribe to:
Posts (Atom)
Search String Inside Oracle Database Objects SQL
SELECT owner, name, type, line, text FROM dba_source WHERE instr(UPPER(text), UPPER('string')) > 0;
-
1. Make a Region with PL/SQL Dynamic Content type . ========== 2. Assign ID to the region using HTP.p ( <span id="TEST_ID...
-
Create Excel File From Classic Report in Oracle Apex Using Java Script 1. Upload File Download File 2. Copy Pest the Code <!DO...