March 2, 2011

Query


Extract the first occuring numbers from the srting

select replace(:string, ltrim(:string, '1234567890')) from dual;

input parameter is 12Abdg345


Count the number of occurence of a letter

select instr('Meeraghee','e') from dual


select :str as "string", :chr as "character", length(:str) - length(translate(:str,chr(0)


:chr,chr(0))) as "count"from dual;
 
replace(:string, ltrim(:string, '1234567890')) from dual;

No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...