Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a trouble with function "Where" in script.
I have a script:
ODBC CONNECT TO [Database MS Access;DBQ=D:\QlikViewAdm\sales.mdb];
SQL SELECT 'Date',
`Distributor`,
`Salesman`,
`Client`,
`Region`,
`City`,
`Product`,
`quantity`,
`amount`
FROM `for pivot`;
and I want to download sales only one definite distributor. I try to use such expressions in the script:
WHERE Distributor='GLP JSC'
or
WHERE match(Distributor, 'GLP JSC')
but I always get error: "Syntax error (missing operator) in query expression"
Can you help me?
Best regards, Stark
In my experience, when you do a select on an ODBC source, the SQL dialect used is that of source engine. You might try to create a query in MS Access and then copy the SQL and paste it into your script....
SQL SELECT 'Date',
`Distributor`,
`Salesman`,
`Client`,
`Region`,
`City`,
`Product`,
`quantity`,
`amount`
FROM `for pivot`;
and I want to download sales only one definite distributor. I try to use such expressions in the script:
WHERE Distributor='GLP JSC'
or
WHERE match(Distributor, 'GLP JSC');
try this script i think ; this was missed in u r script
Hi,
Try this script
SQL SELECT 'Date',
`Distributor`,
`Salesman`,
`Client`,
`Region`,
`City`,
`Product`,
`quantity`,
`amount`
FROM `for pivot`
WHERE Distributor='GLP JSC';
This should work, if not can you attach full script.
Regards,
Jagan.
Hello,
I tried your advice, but, unfortunately, it doesn't work. I attached my script and database, can you test it?
Best regards, Stark
Hi Stark,
PFA the qvw file.
Hope this helps.
Regards,
Neha Rangari
Thank you, it work perfect.
Regards, Stark
Thank you Jagan, you were right, and your advice is correct. I had to just replace " ; " from "FROM `for pivot`;" to "WHERE Distributor='GLP JSC';"
Regards, Stark