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

how do you know the version of your mysql server? : Sql dba

0 Answers  


How long does it take to learn pl sql?

0 Answers  


How does join work in sql?

0 Answers  


write the Sql query for creating database backup?

7 Answers   TCS,


What are all types of user defined functions?

0 Answers  






what is self join and what is the requirement of self join? : Sql dba

0 Answers  


write a query to delete similar records in same table

13 Answers   TCS,


What is the difference between microsoft access and sql?

0 Answers  


How do you bind variables in pl sql?

0 Answers  


Can %notfound return null after a fetch?

0 Answers  


Are left and right joins the same?

0 Answers  


What are Anti joins

1 Answers   IBM,


Categories