Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I can´t get a where statement to work when I load data from a sql db.
Sql Select *
FROM dbo.OVA
Where Date(Datefield) >= '2015-01-02';
When loaded into QV the datefield are
2015-01-01 00:00:00
2015-01-02 00:00:00
I expect this to work as well:
Sql Select *
FROM dbo.OVA
Where Datefield >= '2015-01-02';
Have you tried doing like this maybe:
Table:
LOAD *
Where Date(Datefield) >= '2015-01-02';
Sql Select *
FROM dbo.OVA;
Best,
Sunny
I expect this to work as well:
Sql Select *
FROM dbo.OVA
Where Datefield >= '2015-01-02';
That is good to know Michael Solomovich.
With my little experience, I haven't done any manipulations in the SQL part of the script. Is there a good post/blog which gives the possible things which can be done within SQL part?
Thanks,
Sunny
Hi,
In SQL Date use use tochar() or todate() for date manipulation
and date format like 01-Mar-2015
Regards
Hi Sunny,
I'm not a SQL Guru, just got a lot of practice, mostly (but not only) because of QlikView. One time used to work with Sybase a lot, and they had very good online help. Just keep in mind that SQL is not the same between different databases. For example, the above syntax is not going to work with Oracle.
Regards,
Michael
I was actually referring to SQL within QlikView only. Cause I have worked with SQL previously and I understand some of the syntax, but wanted to know what all SQL syntax-es can be used within QlikView?
Best,
Sunny
I see... QlikView doesn't have its own SQL. As soon as you have SELECT or SQL SELECT (or SQL <anything>) - it is the SQL of the database you're reading from (or even writing to, if allowed). If it works with the database directly, it works within QV as well.
I never realised that Michael
Thanks for sharing
Alan
Now you know
A recent situation. I had to update a table in a test database in MS SQL Server. Didn't have a MS SQL client installed in that environment but had QV desktop. So, I wrote a script like SQL UPDATE... in QV. Ran it, and got what I needed.
WARNING: Don't try it at home!