Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have made a where sql query in qlikview, but it does not work. I want only see the city bangkok.
Can someone help me?
The code is:
Land1:
LOAD Land,
City,
FROM
Gegevensbronnen\Land1.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, no eof)
WHERE City = ("Bangkok");
This:
...
WHERE City = 'Bangkok';
WHERE WildMatch(City,"Bangkok");
load city
from
yourfile
where city ='bangkok'
Use:
Land1:
LOAD Land,
City
FROM
Gegevensbronnen\Land1.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, no eof)
WHERE City = 'Bangkok';
And you need a log in Sub or somthing else:
sub connectToDB
if (vERP = 'cee') then
if (vDBType = 'mssql2005') then
ODBC CONNECT32 TO [STS_SC] (XUserId is Matthias, XPassword is abcd);
else
ODBC CONNECT TO CEE_5_BDV (XUserId is Matthias, XPassword is abcd);
end if
elseif (vERP = 'css') then
ODBC CONNECT TO CSS_export (XUserId is Matthias, XPassword is abcd);
else
// f. Postgres or SQL Server)
if (vDBType = 'mssql2005') then
ODBC CONNECT32 TO $(vODBC_DSN);
else
ODBC CONNECT64 TO $(vODBC_DSN);
end if
end if
end Sub
After Then:
$(Include=$..\..\connect.qvs);
call connectToDB;
LOAD field_a AS account, field_b AS sales,
...;
SQL SELECT * FROM account;
the qvs is a C# script and the other "Include...LOAD... SQL; is in the Script of the Generator. I hope it help you!
HI Maichel
Single quotes around Bankok, and it's case sensitive too!
Land1:
LOAD Land,
City,
FROM
Gegevensbronnen\Land1.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, no eof)
WHERE City = 'Bangkok';
thanks for info,
But I have the cities in a table, when I use the where City = 'Bangkok' then qlikview shows all cities.
Do you know what I can do that I only get bangkok and not all cities?
thanks in advance.