Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to know the Qlikview syntax for the below sql syntax.
How to assign a value to a variable like below in Qlikview.
Declare @MinEventID
@Fristday DateTime,
SELECT @Fristday = convert(varchar(10), Getdate(),101)
SELECT @MinEventID = MIN(eventid)
FROM table1
WHERE datefield > (SELECT DATEADD(dd,-(DAY(DATEADD(mm,1,@Fristday))-1),DATEADD(mm,-1,@Fristday)))
Thanks in advance
Regards,
Leni Balakrishnan
Hi, try something like this:
set v_Fristday = '15/07/2012';let v_Fristday = date(monthstart(num(MonthStart(v_Fristday))-1));
temp:load min(eventid) as temp;SQL select eventid from teventsWHERE screateddate > convert(datetime,'$(v_Fristday)',103);
let v_MinEventID = peek('temp',-1,'temp');
Thanks
Steve