Problem: A column 'Names' contains following values:
'Nitin'
'Ashok'
'Sanjeev'
Write a SQL to break these values into individual characters.
Solution:
select names,
substr(names,level,1) ch
from
(
select 'Nitin' names from dual
union all
select 'Ashok' names from dual
union all
select 'Sanjeev' names from dual
)
connect by prior names=names
and level<=length(names)
AND prior DBMS_RANDOM.STRING ('p',10) IS NOT NULL
return code before grep
-
my 2009 solution return code before grep ( ( ( mycmd echo $? >&3 ) |grep
mytext >&4 ) 3>&1 |(read x;exit $x) )4>&1 my 2025 solution mycmd > >(grep
mytext)
1 week ago
No comments:
Post a Comment