Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

MySQL QUERY

Hi,

I have a MySQL DB from which i am fetching the data into QlikView 

and the there is a date field whise data type is datetime  '2020-05-06 03:14:43'  

in qlikview i have converted the this format to Date(Date,'YYYY-MM-DD') whihc is correct and also took the last update date 

Date(Max(Date),'YYYY-MM-DD')  and store in a variable . 

now when i want to fetch the data greater than the last updated in qlikview   this is not working the data from the MySQL is fetching the all the data and the records are doubles . 

Example

100 records fetched and convetred into QVD format and i have created the vLastUpdated from max of date 

and when i concatenate the fetch from DB the data is not considering the vLAst update and rather loadin the records as 

200 rows .

Any sugestion on this ? do i need to convert date format  for mysql 

Thanks 

 

1 Solution

Accepted Solutions
PrashantSangle

just try this

 

SQL  select * from sales.db

Where loaddate > '2020-05-13 00:00:00';

 

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

5 Replies
smilingjohn
Specialist
Specialist
Author

Hi .

Anu suggestions in my post ? 

I even tried to fetch the data by giving manual date but still the qlikview is fetching the whole data from MySQL db

Load 

Sales,

Loaddate

 SQL * select from sales.db

Where loaddate > date_format('2020-05-11','%Y-%m-%d');

But still the data is not laoding after 11th but it is laoding the complete data . I really don't understand this . 

Your input will really help in resolving this issue .

Since I am typing from mobile there might be typo error please discard 

Thanks 

PrashantSangle

have you tried this code in your mysql environment

 SQL * select from sales.db

Where loaddate > date_format('2020-05-11','%Y-%m-%d');

 

Is it working over there???

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

just try this

 

SQL  select * from sales.db

Where loaddate > '2020-05-13 00:00:00';

 

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
smilingjohn
Specialist
Specialist
Author

Hi Prashanth,

I tred the query in Qlikview but it is fetching the whole data 

SQL  select * from sales.db

Where loaddate > '2020-05-13 00:00:00';

 

but the same query work well and good in MySQL and gives me the data greater than the specified date . 

I am really stuck on this ...

 

Thanks 

smilingjohn
Specialist
Specialist
Author

Thanks Prashanth this worked