Discussion Board for collaboration on QlikView Scripting.
Help needed in below join condition. Throwing syntax error. Please help...
month([OrderDate]) as OrderMonth,
Sales_SalesOrderHeader.SalesOrderID as SalesOrderID,
Sales_SalesOrderHeader.SalesPersonID as SalesPersonID,
ON Sales_SalesOrderDetail.SalesOrderID = Sales_SalesOrderHeader.SalesOrderID
which error do you get?
maybe the WHERE? is it a variable?
or a missing space here
Please find attached the screen shot for error and script i'm using
You are correct For Where i'm passing variable....
Any update guys....
does the SQL syntax work outside QlikView. I often see 'INNER JOIN' instead of just 'JOIN' in native SQL , but it depends what the driver accepts.
If you remove the join (and extra fields) and just do a from <table> and where <condition> (so remove the join) do you get the error ?
you can try
- first without where; does it works?
- if yes without the date, does it works
to identify the wrong part
MS Access use the Jet Engine which use the hash # for any date literal - so you will have to change the single quotes into hashes - like this:
OrderDate IN ( #2001-07-01 12:00:00 AM# , #2001-07-02 12:00:00 AM# .......... )