Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
I just recently began looking at qlikview and from what I have seen I like it alot
I already manged to imort my tables from a sybase DB and am currently working on a incremental update script. My problem is in the "where clause".
LET vIncrementalExpression = 'StartTime >= ' & date(peek('maxdate'),'YYYY-MM-DD hh:mm:ss') & ' AND ResultReliablityFlag = 1';
this expression will give me StartTime >= 2012-02-02 16:00:00 AND ResultReliablityFlag = 1 but what I need is:
StartTime >= '2012-02-02 16:00:00' AND ResultReliablityFlag = 1
I made the ' to emphasize them. I have tried the following variations but nothing worked,
LET vIncrementalExpression = 'StartTime >= ' & 'char(39)' & date(peek('maxdate'),'YYYY-MM-DD hh:mm:ss') & 'char(39)' & ' AND ResultReliablityFlag = 1';
LET vIncrementalExpression = 'StartTime >= ' & char(39) & date(peek('maxdate'),'YYYY-MM-DD hh:mm:ss') & char(39) & ' AND ResultReliablityFlag = 1'; <--gives an erro because of char(39)
LET vIncrementalExpression = 'StartTime >= ' & "'" & date(peek('maxdate'),'YYYY-MM-DD hh:mm:ss') & "'" & 'AND ResultReliablityFlag = 1';
Any ideas how can wrap ' around my dateTime ?
Thanks.
Try
LET vIncrementalExpression = 'StartTime >= ' & chr(39) & date(peek('maxdate'),'YYYY-MM-DD hh:mm:ss') & chr(39) & ' AND ResultReliablityFlag = 1';
i.e. use chr() instead of char()
Try
LET vIncrementalExpression = 'StartTime >= ' & chr(39) & date(peek('maxdate'),'YYYY-MM-DD hh:mm:ss') & chr(39) & ' AND ResultReliablityFlag = 1';
i.e. use chr() instead of char()
Hi,
Simple, just use CHR(39) 😉
LET vIncrementalExpression = 'StartTime >= ' & chr(39) & date(peek('maxdate'),'YYYY-MM-DD hh:mm:ss') & chr(39) & ' AND ResultReliablityFlag = 1';
Regards,
Stephen
Hahah chr() instead of char(), nevertheless thanks for pointing it out for me
HI Swuehl
I truly am battling with this one. I just cant get the chr(39) in the right places!
LET vd_MaxMonth ='=If(Max(Calendar.FMNum)>=6,Right(Calendar.FY,4)&Num(Max(Calendar.FMNum)-5,'00'))&01,Left(Calendar.FY,4)&Num(Max(Calendar.FMNum)+7,'00')&01)';