how to select alphabets in a one column , for this the
table name is PA_TASKS and column name is TASK_NUMBER, In
TASK_NUMBER the data like this
1.1.3NN,1.1.4NN,1.5.1NN,1.3.2NE,1.5NN,1NN,1.2NE,1CE , For
this i need to disply output as NN,NN,NN,NE,NN,NN,NE,CE,
Its some urgent requirement ,thanks in advance
Answer Posted / hitendra yadav
Dear friend
,
you can use this select statement:-
select trim(translate(TASK_NUMBER,'.0123456789',' ')) from
PA_TASKS;
For example:-
select trim(translate('1.1.3NN','.0123456789',' ')) from
dual;
it will give NN as output
if value format same like this then you can use substr
function also for it like this:-
select substr(TASK_NUMBER,-2) from PA_TASKS ;
For example:-
select substr('1.1.3NN',-2) from dual;
it will give NN as answer.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
what is dbms? : Sql dba
how many tables will create when we create table, what are they? : Sql dba
what is sql server agent? : Sql dba
what are all the common sql function? : Sql dba
If a cursor is open, how can we find in a pl/sql block?
Do we need to rebuild index after truncate?
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
What is the current version of postgresql?
How do I remove duplicates in two columns?
what is schema? : Sql dba
define sql insert statement ? : Sql dba
what are the advantages of sql ? : Sql dba
how to start mysql server? : Sql dba
What is the current version of sql?
how to escape special characters in sql statements? : Sql dba