Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

SQL question

Hi,

I need to put two layers together - an SQL_SELECT (that would output a qvd file) and the consecutive LOAD in QlikView - I need to put both together in one SQL statement to have a "live" access to the database.

What I'm currently trying to do is to limit that to the current day.

=> Can I use the CURDATE() function I have found on some MySQL-site to do that?

Thanks a lot!

Best regards,

DataNibbler

1 Solution

Accepted Solutions
PradeepReddy
Specialist II
Specialist II

If I understand the requirement correctly, u are trying to do the preceding load

If you are using the MSSQL Server as Database, you can use the bellow condition in where clause of SQL statemnet,

EX:

Table1:

Load *;

SQL select  * from  Table1

where Date_Field=convert(Date,getdate());

View solution in original post

4 Replies
its_anandrjs

Inplace of CURDATE() you can use NOW() in the qlikview and use it in the load query.

datanibbler
Champion
Champion
Author

Hi anand,

thanks for the answer! But NOW() would give me the time as well, no? But I want all the records from the current day, so - well, I could split the output of NOW() to have only the date, but that seems to be a bit overdone...

Best regards,

DataNibbler

PradeepReddy
Specialist II
Specialist II

If I understand the requirement correctly, u are trying to do the preceding load

If you are using the MSSQL Server as Database, you can use the bellow condition in where clause of SQL statemnet,

EX:

Table1:

Load *;

SQL select  * from  Table1

where Date_Field=convert(Date,getdate());

datanibbler
Champion
Champion
Author


Hi pradeep,

yes - we have Preceding_LOADs everywhere with our SQL_statements. Thanks a lot!

Best regards,

DataNibbler