Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


I have following column in the table.
col1
1
a
b
c
2
3
d

and I want to display it as
num chars
1 a
2 b
3 c
4 d

numbers in one column and letters in another column.



I have following column in the table. col1 1 a b c 2 3 d and I want to display it as nu..

Answer / sreenivasulu sangatipalli

SELECT REGEXP_SUBSTR(COL,'[A-B]+',COL) AS COL1,REGEXP_SUBSTR(COL,'[1-9]+',COL) AS COL2 FROM TEST10;
SELECT * FROM (SELECT CASE WHEN REGEXP_LIKE(COL,'[A-Z]+','i') THEN COL END ALPHS,
CASE WHEN REGEXP_LIKE(COL,'[0-9]+') THEN COL END NUMBS
FROM TEST10 ) where ALPHS is not null OR NUMBS is not null;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

In what condition is it good to disable a trigger?

0 Answers  


What is dense_rank in sql?

0 Answers  


What is sqlexception in java?

0 Answers  


What is sql rowcount?

0 Answers  


What is the difference between functions, procedures, and packages in pl/sql?

0 Answers  






What are the advantages of indexing?

0 Answers  


What is the use of sql trace?

0 Answers  


Mention what does the hierarchical profiler does?

0 Answers  


What is the difference between the implicit and explicit cursors?

0 Answers  


declare l1 number := null; l2 number :=null; begin if l1=l2 then message('equal'); else if l1<>l2 then message('not equal'); else message('else'); end if; end if; end; What will be the output ?

7 Answers   Oracle,


List and explain the different types of join clauses supported in ansi-standard sql?

0 Answers  


Why do you partition data?

0 Answers  






Categories