Anyone who could help me with my VBA problem regarding SQL Query(JOIN)
I have three tables:
TableA with fields(F1, F2, F3, F4, F5)
TableB with fields(F0, F1, F6, F7, F8)
TableC with fields(F0,F1,F6)
Now, with TableB.F0='2010', I want to get the
records from Table A and Table B to be placed in TableC where (TableA.F1=TableB.F1 AND TableB.F6='1')
OR if no records found from TableB,
It will just get all the records as new records to be place to Table C from TableB where TableB.F6='1'
I have been trying some INNER JOIN, LEFT JOIN not successul on this one. as much as possible I would like to make this QUERT in one SELECT statement.
Can somebody help me?
I have three tables:
TableA with fields(F1, F2, F3, F4, F5)
TableB with fields(F0, F1, F6, F7, F8)
TableC with fields(F0,F1,F6)
Now, with TableB.F0='2010', I want to get the
records from Table A and Table B to be placed in TableC where (TableA.F1=TableB.F1 AND TableB.F6='1')
OR if no records found from TableB,
It will just get all the records as new records to be place to Table C from TableB where TableB.F6='1'
I have been trying some INNER JOIN, LEFT JOIN not successul on this one. as much as possible I would like to make this QUERT in one SELECT statement.
Can somebody help me?