Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
could you help on below..
SQL to Qlikview:
Select * from Category where
CreateDate =Case IF(DayName(ModifiedDate)='Monday' then ModifiedDate
I have tried like..
Where CreateDate = IF(WeekDay(ModifiedDate)='Mon', ModifiedDate), giving wrong result
Thanks in Advance....!
If you are loading data from an sql database then you must use the sql dialect that your database server understands. You can't use Qlik script language because your database won't understand it.
If you're loading data from a file or another table that's already loaded then you use the LOAD statement. In that case the where clause you posted should work. If that gives a wrong result then we'll need more information. Can you post a small qlikview document that demonstrates the problem?
I can use same query in Qlikview, but I'm not using SQL query, some one has provided that query. I need to convert into Qlikview.
is this correct Where condition, anything wrong??
Load * from category Where CreateDate = IF(WeekDay(ModifiedDate)='Mon', ModifiedDate-3, ModifiedDate-1)
Select * from category Where CreateDate = IF(WeekDay(ModifiedDate)='Mon', ModifiedDate-3, ModifiedDate-1)
You are using SELECT. That means you MUST use the SQL dialect that your database server understands. Your database server DOES NOT understand Qlik script language like the WeekDay function. Therefore DO NOT USE Qlik functions in sql statements.