I have problem with this 3 table below from MS ACCESS to do "SQL CASE IF ELSE" where I don't how to start.
Table A (Registrations)
Name | Desc | Amount | Year
NameA | JAN&NOV | 100.00 | 2015
NameA | BOOKS | 70.00 | 2015
NameA | UNIFORM | 100.00 | 2015
NameB | JAN&NOV | 100.00 | 2015
Table B (Montly Payment and Others)
Name | Desc | Amount | Year
NameA | PAY FEB | 100.00 | 2015
NameB | PAY MAC | 100.00 | 2015
NameA | PAY MAC | 100.00 | 2015
NameB | OTHERS | 20.00 | 2015
NameB | PAY APR | 100.00 | 2015
Table C (Student List)
Name | Year | Class
NameA | 2015 | A
NameB | 2015 | B
Result:
Name | Year | Class | Jan&Nov | Pay Feb | Pay Mac | Pay Apr
NameA | 2015 | A | 100.00 | 100.00 | 100.00 | 000.00
NameB | 2015 | B | 100.00 | 100.00 | 100.00 | 100.00
I need to create field Pay Jan&Nov, Pay Feb till Pay Oct with data based of this 3 table. If data do not exist I need to format it as "00.00" or "NOT PAID".
I hope anybody who have a solutions please help me. I am new of SQL statement actually.