Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SELECT TO_CHAR( A,' MON') FROM TEST ORDER BY TO_CHAR( A,' MM');
SQL Query to Fetch Character Data from String value [Suppose String value is:
1DA2SDJD + 4567@@## HGSD89HH0] select regexp_replace(' 1DA2SDJD + 4567@@##
HGSD89HH0','[ ^ A-Z]') as a FROM dual;
SQL query to convert column data into row data with comma separated.
SELECT LISTAGG (col1, ',') WITHIN GROUP (ORDER BY ROWID) "COLUMN TO ROW" FROM
table1;
SQL query to extract Day, Month and Year from date in Oracle [Suppose Date Time
Field value is 17-Nov-2014 15: 35: 26] Query to fetch day from date: select
extract (day from to_date(' 17-Nov-2014 15: 35: 26', 'DD-MON-YYYY HH24: MI:SS'))
"DAY" from dual;
Query to fetch month from date: select extract (month from to_date(' 17-Nov-2014
15: 35: 26', 'DD-MON-YYYY HH24: MI:SS')) "MONTH" from dual;
Query to fetch year from date: select extract (year from to_date(' 17-Nov-2014 15:
35: 26', 'DD-MON-YYYY HH24: MI:SS')) "YEAR" from dual;
SQL query to extract Hours, Minutes and Seconds from date in Oracle Query to fetch
hour from date: select extract( hour from cast( to_date(' 17-Nov-2014 15: 35: 26',
'DD-MON-YYYY HH24: MI:SS') as timestamp)) "HOUR" from dual;
Query to fetch minutes from date: select extract( minute from cast( to_date(' 17-
Nov-201415: 35: 26', 'DD-MON-YYYY HH24: MI:SS') as timestamp)) "MINUTES" from dual;
Query to fetch seconds from date: select extract( second from cast( to_date(' 17-
Nov-2014 15: 35: 26', 'DD-MON-YYYY HH24: MI:SS') as timestamp)) "SECONDS" from
dual;
In 12c Oracle has introduced UTL_CALL_STACK package to display the content of the
error stack in proper format. It has 3 API ERROR_DEPTH, ERROR_MSG, and
ERROR_NUMBER. The below API using utl_call_stack need to be created one time in
your database and can be called by any code in your oracle PL/SQL application:
PRAGMA INLINE