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


Please Help Members By Posting Answers For Below Questions

Explain the difference between cursor declared in procedures and cursors declared in the package specification?

769


Why select is used in sql?

694


Can we insert in sql function?

774


Explain the insert into statements in sql?

729


Is pl sql and postgresql same?

769






Mention what are different methods to trace the pl/sql code?

747


What do you mean by table in sql?

696


What programs use sql?

731


What are the various levels of constraints?

855


What is autocommit sql?

708


What is substitution variable?

788


How do you bind variables in pl sql?

761


how to rename an existing table in mysql? : Sql dba

728


What are stuff and replace function?

772


Can we rename a column in the output of sql query?

727