Discussion Board for collaboration related to QlikView App Development.
Hi,
I'm testing Direct Discovery and I'm trying to use 'WHERE' statement in my Direct Query but it doesn't work.
I have a date field and I want to obtain only the data that belongs to year 2014. So I did that:
DIRECT QUERY
DIMENSION
Customer,
Date,
Salesman,
Shop
NATIVE('CAST (EAN as nvarchar(30))') as EAN
MEASURE
UDS,
Amount
FROM GRP.dbo.Sales
WHERE Year(Date) = 2014;
I tried to use NATIVE statement: WHERE NATIVE('Year(Date)') = 2014; without success.
I found a workaround WHERE Date >= '01/01/2014' and Date <= '31/12/2014' but I'm interested to do it with qlik functions.
Some help?
Thanks
Keep in mind that the DIRECT QUERY statement is in essence a SQL SELECT statement that needs to be performed on the database. For this reason, it can't possibly use Qlik functions like Year() - you have to stay within the SQL syntax.
Keep in mind that the DIRECT QUERY statement is in essence a SQL SELECT statement that needs to be performed on the database. For this reason, it can't possibly use Qlik functions like Year() - you have to stay within the SQL syntax.
Thank to both of you for your answers.