[askdba] SQL Doubt

  • From: "Mudhalvan, Moovarkku" <mmudhalvan@xxxxxxxxxxxxxxx>
  • To: <askdba@xxxxxxxxxxxxx>
  • Date: Tue, 19 Oct 2004 15:08:12 +0900

Dear Friends,
        We have two tables loan,entity_loan.=20

        Loan -> Loan_id
        Entity_loan -> Loan_id,Entity_id,Entity_type

Values in the Loan table

Values in Entity_loan Table
Loan_ID         Entity_ID       Entity_Type
L1              E1              B
L1              E1              G
L1              E2              B
L1              E3              G

I need the output like=20

Loan_ID         Borrower1       Borrwer2        Guar1           Guar2
L1              E1              E2              E1              E3

Please if any one can have any idea let me know.

Thanks in Advance
Mudhalvan M.M

Other related posts: