Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

VBScript / help needed with query

$
0
0
Hi!
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:
Code:

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
Code:

FROM OPNPOS INNER JOIN
to
Code:

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? :)

Viewing all articles
Browse latest Browse all 13329

Trending Articles