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 the primary key?
Is sql better than excel?
How can you fetch first 5 characters of the string?
What is faster join or subquery?
What is trigger in sql? Explain
How to execute a stored procedure?
How does postgresql compare to mysql?
What do you understand by pl/sql cursors?
what are the properties and different types of sub-queries? : Sql dba
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
What will you get by the cursor attribute sql%found?
What are the two types of periodical indexes?
How to run pl/sql statements in sql*plus?
What are the basic sql commands?
What is procedure explain with example?