I'm trying to build a query that will access three tables and I want to run this query via VBscript.
This is my working version:
sSQL = "SELECT OPNPOS.FUND, SECRTY.TKR, SECRTY.ISIN, OPNPOS.QTY, OPNPOS.LCL_ACCINC, PRIHST.PRICE / SECRTY.FACTOR AS CENA
FROM OPNPOS INNER JOIN (SECRTY INNER JOIN PRIHST ON SECRTY.TKR = PRIHST.TKR) ON OPNPOS.TKR = SECRTY.TKR
WHERE OPNPOS.FUND IN " & sFUND & " AND PRIHST.PRCDATE = #" & sDATA & "#
ORDER BY OPNPOS.FUND"
I need to change this query in order to see every element from OPNPOS table so I would change
FROM OPNPOS INNER JOIN
FROM OPNPOS LEFT JOIN
but it gives me an error.
I know that there are some ways to workaround this but I've tried a lot of combinations and get no success ;/
Anyone can help me?