Feeds:
Posts
Comments

Posts Tagged ‘sql query’

User comments for the following queries are highly appreciated..
How does one compare data between 2 identical tables in DB2 ? In Oracle, one can use the minus option which is not there in DB2.

Read Full Post »

create or replace function spell_number( p_number in number ) return varchar2
          as type myArray is table of varchar2(255);
          l_str myArray := myArray( ”, ‘ thousand ‘, ‘ million ‘, ‘ billion ‘, ‘ trillion ‘, ‘ quadrillion ‘, ‘ quintillion ‘, ‘ 
          sextillion ‘, ‘ septillion ‘, ‘ octillion ‘, ‘ nonillion ‘, ‘ decillion ‘, [...]

Read Full Post »

To pass the parameter to stored procedure to get it executed at the run time,
param2 varchar2(50);
BEGIN keyword as param2 varchar2(50);
param2 := chr(39)||replace(param1,’,’,”’,”’)||chr(39);
select * from hr.employees where job in (param2);
as
select * from hr.employees where job in (param2)

Read Full Post »