Tuesday, May 10, 2011

'Hospitals phone No's in chennai'

GH: 25302469
KMC: 28255331
Stanley: 25281346
Royapettah: 28483051
ESI: 26449784
Dental: 25340441
Cancer: 24910754
Child: 4200180
Women: 28191982
TB: 26461337
Sooriya: 23761750

Sunday, May 8, 2011

Difference Between View and Materialized View


Step 1 : Create Base Table

                                create table T1(KEY number,VAL varchar2(10));
                               
insert into t1 values(1,'a');
insert into t1 values(2,'b');
insert into t1 values(3,'c');
insert into t1 values(4,'');

                               
Step 2 : Create Ordinary View

                                create view v as  select * from   t1 ;

Step 3 : Create Materialized  View

                                create materialized view log on t1 with rowid;


                                create materialized view mv refresh fast with rowid as select * from   t1 ;

Step 4: Check for rowid similarity and difference in materialized view

                                select rowid from T1 order by rowid ;

                                select rowid from v order by rowid ;

                                select rowid from mv order by rowid ;

Step 5 := Update base table

                                update t1 set val = upper(val);

Step 6 :=  After DML try to select

                                select * from T1 order by rowid ;

                                select * from v order by rowid ;

                                select * from mv order by rowid ;

Step 7 :- Refersh your materialized View

                                execute dbms_mview.refresh( 'MV' );

Step 8 := Try to update Base table Via both the view

                                                update v set val = lower(val); -- View will be create
                                               
                                                update mv set val = lower(val); -- Here it won't
                                               
Stpe 9 := Drop all objects.

drop materialized view mv ;

drop view v ;

drop table t1;


Prepared By
Sivakurunath S

Wednesday, April 27, 2011

Diff of Unhandled and Handled exception


Step 1 : Create Table

 create table cust_table
 (
   NAME                                VARCHAR2(30),
   ORD_DT                            DATE,
   PUR_DATE                    DATE,
   QUANTITY                        NUMBER,
   ITEM_NO                         VARCHAR2(30)
  );
 
  Step 2 : Try to execute a block without exception part.
 
    begin
                                insert into cust_table(NAME,ORD_DT,PUR_DATE,QUANTITY,ITEM_NO) values('Sivakurunath',sysdate-1,sysdate,100,'ORA0001');
                               
                                insert into cust_table(NAME,ORD_DT,PUR_DATE,QUANTITY,ITEM_NO) values('Sivakumar',sysdate-1,sysdate,100,'ORA0002');
                               
                                update cust_table set NAME='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
                                where ITEM_NO='ORA0002';
 end;
 /

  Step 3 : Do select ,Check how many rows inserted and updated.
 
 select * from cust_table;

 Step 4 : Try to execute same block with  exception.
 
  begin
 
 
 
                                insert into cust_table(NAME,ORD_DT,PUR_DATE,QUANTITY,ITEM_NO) values('Sivakurunath',sysdate-1,sysdate,100,'ORA0001');
                               
                                insert into cust_table(NAME,ORD_DT,PUR_DATE,QUANTITY,ITEM_NO) values('Sivakumar',sysdate-1,sysdate,100,'ORA0002');
                               
                                update cust_table set NAME='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
                                where ITEM_NO='ORA0001';
                               
 exception
     when others then
        dbms_output.put_line(sqlerrm);
 end;
 /

 step 5 : Do select ,Check how many rows inserted and updated.

 select * from cust_table;


 step 6 : Find in which scenario transaction remain as a part of transaction (step 2 or step 4).

Prepared By
Sivakurunath S

Sunday, April 24, 2011

Sachin - Cricket God

1.I've seen GOD, he bats at no.4 for
indian in Tests. -Hayden.
2.Sachin is a genius, i'm a mere mortal. 
-Lara.
3.Sachin is Crickets GOD.
-Richards.
4.If Sachin plays well.. India sleeps well. -Harsha bhogle.
5.U get him out and half d battle is won.
-Ranatunga.
6.Der r 2 kind of batsmen in d world.1 Sachin Tendulkar.2 all the others. -Andy flower.
7.I never get tired during umpiring whenever sachin is on crease.
-Rudy Kortzen.
8.I'm fortunate dat i've 2 bowl at him nly in the nets.-Kumble.
9.We didn't lose 2 a team calld india.. We lost 2 a man calld Sachin. -Mark Taylor.
10.I've joked b4 dat der is a good chance dat I might retire b4 Tendulkar.
-MS Dhoni.
{Today Master blasters birthday.Proud to b an indian. Pray for him}. Sachin Rocks..

Wednesday, April 20, 2011

No Title Bar For Android Coding


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);

Import
import android.view.Window;