Hi, I have 3 tables (Table1 to Table3 in the following example), and I want to combine that with a sql statement so it would give a result shown in "output" (to be shown on datagrid, for example)
I need the final output to show just one unique line for each name, and not repeating lines, and also to sum data.
Thanks,
Udi
Code:
Table1_Customer
C_ID C_Name
1 James
2 Mike
3 John
Table2_DataType
D_ID D_Name
1 Deposit
2 Withdraw
3 Yield
Table3_Numbers
O_ID C_ID N_value
1 1 10000
1 1 1500
2 1 450
3 1 1.5
3 2 2.2
3 3 0.4
1 2 10000
1 2 2500
2 2 450
1 3 11000
Output:
C_Name Deposit Withdraw Yield
James 11500 450 1.5
Mike 12500 450 2.2
John 11000 0 0.4
Thanks,
Udi