How to find string or key value using pl/sql code?

Answers were Sorted based on User's Feedback



How to find string or key value using pl/sql code?..

Answer / gourvendra singh

if you want to find a string value you can use the
following command
select length(TRIM(TRANSLATE(string,'+-.123456789',' ')))
from dual;
string=value that u entered
if the result is null then the string is numeric else its a
character

Is This Answer Correct ?    5 Yes 2 No

How to find string or key value using pl/sql code?..

Answer / kumarvijay

var=1; --var='a'

select to_number(var) from dual;

if variable holds string it will through exception else it
will execute.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

what are the authentication modes in sql server? : Sql dba

0 Answers  


i have a table emp and columns ename,empno,mgr_id,i need ename,manager name as result i.e employee respective manager.. example empno ename mgr_id 1 john 3 2 paul 3 3 smith 1 4 kevin 1 5 stewart 2 result has to look like this ename manager john smith paul smith smith john kevin john stewart paul can u plz help me out in this.....

8 Answers  


How can you create Cursor with parametres ?

3 Answers  


Show the cursor attributes of pl/sql.

0 Answers  


What is difference between stored procedure and trigger?

0 Answers  






Which one is the Best approach to put code, among Triggers and Procedures? Explain?

1 Answers   Sierra Atlantica,


What is query execution plan in sql?

0 Answers  


What is the sql*loader? : aql loader

0 Answers  


What is sql*plus?

0 Answers  


What is the difference between delete and truncate commands?

0 Answers  


How to display the current date in sql?

0 Answers  


How many types of index are there?

0 Answers  


Categories