Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
datanibbler
Esteemed Contributor

One more question on SQL code

Hi,

I would jsut like to ask:

Is this a valid SQL_statement in Qlikview?

>>> WHERE   END_TIME <= Time(Frac(Now()), 'hh:mm')  <<

(I want to load from a database table all records from today (there is another filter for that) and up to the ReloadTime (I could alternatively place it in the preceding LOAD, but it would be more elegant to just not load any unwanted records from the database instead of dropping them afterwards.

Also, as the report is supposed to run every 10min, keeping the SQL_SELECT to the absolute minimum is crucial.

Thanks a lot!

Best regards,

DataNibbler

1 Solution

Accepted Solutions
MVP
MVP

Re: One more question on SQL code

May be like:

WHERE Class not In ('A' , 'S') ;

4 Replies
MVP
MVP

Re: One more question on SQL code

Try like:

WHERE   END_TIME <= Timepart(Now())

datanibbler
Esteemed Contributor

Re: One more question on SQL code

Thanks tresesco!

One more: I want to use WHERE-clauses to exclude two values: Like

>> WHERE Class <> "A" and Class <> "S" <<

That should be valid - but I know that there can be significant differences in performance, depending on how a query is formulated. Is there a better way to write this? - I cannot "turn it around" and filter for only the values I want, I don't know what those values are/ can be and there might be more going forward.

Thanks a lot!

Best regards,

DataNibbler

MVP
MVP

Re: One more question on SQL code

May be like:

WHERE Class not In ('A' , 'S') ;

datanibbler
Esteemed Contributor

Re: One more question on SQL code


Thanks!

I was aware of this >In< - in general - but not in this context. I have never done much work with SQL.

Best regards,

DataNibbler

P.S.: Is there any specific source (book, website or whatever) that you can recommend rgd. SQL in QlikView?

There are plenty of SQL sites, but I'm always sceptical as there are so many variations of SQL...

Community Browser