ODI Real time Scenario's and Interview Questions
Pages
Introduction
ODI Architecture
Data Warehouse Concepts
ODI 12c Material
ODI Interview Questions
SQL interview questions
Saturday, April 23, 2016
Opposite to ListAgg Function
Example: (single Record)
Single record 'Trinesh,Shanthi,Tejesh,Vasavi' need to convert into 4 records as follows
Trinesh
Shanthi
Tejesh
Vasavi
using simple SQL query.
Query:
SELECT REGEXP_SUBSTR('Trinesh,Shanthi,Tejesh,Vasavi','[^,]+',1,LEVEL) NAMES FROM DUAL
CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE('Trinesh,Shanthi,Tejesh,Vasavi','[^,]+'))+1
Example: (Multiple Record)
Source:
Query:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment