Beruflich Dokumente
Kultur Dokumente
source qualifier
sorter transformation
sequence generator
Router trans
Rank trans
normalizer trans
in normalizer trans we can create fields it will take automatically input rows and output rows
joiner trans
filter trans
expression
aggregator trans
lookup connected
stored procedure......
first we have create procedure....
SQL> create or replace procedure tsalary(sal in emp.sal%type,deptno in emp.dept%type,tsal out number)
2 is
3 begin
4 tsal:=sal+deptno;
5 end;
6 /
Procedure created.
creating a cube.....
first we have to go target.....then....click the create/edit dimension
for the hierarchy u can give one name(name is h1) then u can select the non-normalized then click apply finish
then select the fields (primary keys and measurable data) then click the next button
then we can see the one window(there if we want we can insert the new fields) click the finish
then select and drag the two dimension table and fact table into the warehouse designer then generate the tables.....
for the cube mapping....we need two lookup transformations then save it finish....the cube
NUMBER
NUMBER(4,2)
DATE
-- FK
Effective_Upto
DATE
NUMBER
-- PK
Borrower_Status_Desc
VARCHAR2(30)
Borrower_Status_Action
VARCHAR2(200)
==================================================================================
Table Name: Loan_Master
Loan_ID
NUMBER
-- PK
Loan_Scheme_ID
NUMBER
-- FK (from Loan_Scheme_Master table)
Borrower_ID NUMBER
-- FK (from Borrower_Master table)
Loan_Sanction_Date
DATE
Loan_Sanction_Amount
NUMBER(10,2)
Loan_Sanctioned_By
NUMBER
-- FK (from Employee_Master table)
Loan_Duration
NUMBER
-- In months
Installment_Type
VARCHAR2(10)
-- Monthly, Quarterly, Half Yearly, Yearly
Installment_Amount
NUMBER(10,2)
Installment_Grace_Period
NUMBER(3) -- In days
Installment_Penalty_Rate
NUMBER(4,2)
=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=============-=-=-=-=========================-=Table Name: Loan_Installment_Master
Loan_ID
NUMBER
-- FK(Loan_ master)
Installment_No
NUMBER(3)
Installment_Due_Date
DATE
Installment_Amount
NUMBER(10,2)
Installment_Status
VARCHAR2(15)
-- Due, Paid, Due But Unpaid
-------------------------------------------------------------------------------------------------------------------------------------------Table Name: Loan_Repayment
Loan_ID
NUMBER
-- FK
Receipt_ID
VARCHAR2(25)
Receipt_Date
DATE
Amount_Received
NUMBER(10,2)
Received_By
NUMBER
-- FK (from Employee Master table)
Paid_By
VARCHACR2(25)
================================================================================
Table Name: Employee_Master
Employee_ID
Employee_Name
Employee_Designation
Department_ID
NUMBER
-- PK
VARCHAR2(30)
VARCHAR2(30)
NUMBER
-- FK (from Department_Master table)
insert into
insert into
insert into
insert into
insert into
insert into
insert into
insert into
insert into
insert into
insert into
insert into
insert into
procedures &functions:
1.
create function compInstall8( ploanid in number,pinstalduedate in
IS
CURSOR C1 IS
select loan_id,Installment_Due_Date,Installment_Stat
loan_id=ploanid;
V1 C1%ROWTYPE;
BEGIN
OPEN C1;
FETCH C1 INTO V1;
IF C1%FOUND=FALSE THEN
RETURN(1);
ELSE
IF V1.Loan_ID=ploanid AND
V1.Installment_Due_Date=pinstalduedate AND
V1.Installment_Status=pinstalstatus
THEN
RETURN(2);
ELSE
RETURN(3);
END IF;
END IF;
CLOSE C1;
end compInstall8;
2.
create function compInstall7( ploanid in number,pinstalduedate in date,pinstalstatus in char) return number
IS
CURSOR C1 IS
select loan_id,Installment_Due_Date,Installment_Status from Loan_Installment_Master where
loan_id=ploanid;
V1 C1%ROWTYPE;
BEGIN
OPEN C1;
FETCH C1 INTO V1;
IF C1%FOUND=FALSE THEN
RETURN(1);
ELSE
IF V1.Loan_ID=ploanid AND
V1.Installment_Due_Date=pinstalduedate AND
V1.Installment_Status=pinstalstatus
THEN
RETURN(2);
ELSE
RETURN(3);
END IF;
END IF;
CLOSE C1;
end compInstall7;
Reports:
===================================================================================
=====================================================================================
===================================================================================
=================================================================================
==================================================================================
===================================================================================
====================================================================================
==============================================================================
==============================================================================
===========================================================================
=================================================================================
==================================================================================