Monday, September 23, 2019

SQL Interview Questions Part - 2

SQL> WITH split_val AS (SELECT 'A,B,C,D,E' AS VAL FROM DUAL)
  2      SELECT REGEXP_SUBSTR (VAL,
  3                            '[^,]+',
  4                            1,
  5                            ROWNUM)
  6                AS result
  7        FROM split_val
  8  CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (VAL, '[^,]+')) + 1;

RESULT
------------------------------------
A
B
C
D
E

SQL>

No comments:

Post a Comment

Delete Row Button to all records of Interactive Report in Oracle Apex

 1. add 'Delete' Del column to Report Query 2. Set the Following Properties for the DEL Column Type: Link Heading: Delete Targ...