Friday, January 15, 2010

test





# code here

Friday, September 05, 2008

Tea shops

Tea price got increased This is the news really going

Tuesday, April 11, 2006

Checked Exception ?

where to handle Checked exception ? and where-not ?
Java's checked exceptions have become highly controversial and it seems to be accepted in the Java community that checked exceptions should only be used when the exceptions can be handled in the application.
Exceptions that cannot be handled in any meaningful way by application code should be allowed to go on unchecked. for ex : SQLException is a checked exception, application code must handle it, either catching it and doing something with it or explicitly throwing it to calling code.

Thursday, April 06, 2006

Do you DUAL ?

DUAL

Tuesday, April 04, 2006

Work around

select TO_NUMBER ('13,000.09', '99G999D99','nls_numeric_characters = ''.,''') from dual

select TO_NUMBER ('13.000,09', '99G999D99','nls_numeric_characters = '',.''') from dual

Wednesday, March 29, 2006

get the top n rowns from M rows of a Resultset

select *
from ( select a.*, rownum rnum
from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
where rownum <= MAX_ROWS ) where rnum >= MIN_ROWS

Tuesday, March 28, 2006

The smart way of coding

I had an requirement like
":,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,"

i have to replace the first : with 1 and the second : with 2 and it goes on.....

the solution for that was

select max(sys_connect_by_path(l,',')) from
(select level l
from dual
connect by level <= length(replace(':,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,',',')))
start with l=1
connect by l = prior l+1

could have done this way , it would have been better.
i was forced to type manually , LOL [reason : to make sure it is correct.]
it sucks, always.. use ur skills instead of manual service.
for that only we have been hired ;)