
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
where clause in SQL statement
Here is my load statement
LOAD eventid,
itemid,
soldon,
Year(soldon) as Year,
Month(soldon) as Month,
Day(soldon) as Day,
price;
SQL SELECT *
FROM advast
where soldon>'11/11/2014';
I get an error saying
SQL SELECT *
FROM advast
where soldon>'11/11/2014'
I'm not sure what is wrong with my script, without the WHERE clause it works fine.
Does the where clause just not work in a SQL statement in QV?
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
LOAD eventid,
itemid,
soldon,
Year(soldon) as Year,
Month(soldon) as Month,
Day(soldon) as Day,
price
where soldon>'11/11/2014';
SQL SELECT *
FROM advast;
should work but could take a longer time to load.

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works, but the SQL syntax could be wrong. What data type is soldon in the database ? and what database is this ? (oracle, SQL Server etc...)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
apparently this error is obtained.
already dealt with the connection, ODBC or OLE DB, you must apply before your code
I leave this link can help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For most of the Sql based databases date has to be in this format '11-Nov-2014'.
Like this it should be, This is a SQL Query successfully executed on a Oracle Database.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an OLE DB connection for Visual FoxPro
I tried to apply the code before the connection, not sure how it's supposed to work but I still get a script error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could try using the canonical date format 'YYYY-MM-DD', and see if this works.
It may be that your localisation settings are causing the date to be misinterpreted.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did anyone apply a successfully where clause on a sql statement in qlikview, does anyone know any documentation on that?
I tried applying a different where clause on a simple numeric field and this format keeps giving me an error
LOAD imach,
`trans_act`,
locationid,
reftrans;
SQL SELECT *
FROM todin
where locationid='22';

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many of us regularly use where clauses in our QlikView SQL extracts.
In this instance it may be that there's an issue with string / numeric conversion. If your locationid field is numeric, try removing the single quotes from your where clause

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
also, remove the single quotes from around 'trans_act'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This worked for the numeric field, removing the single quotes, now I'm working on formatting the date field for my where clause to work

- « Previous Replies
-
- 1
- 2
- Next Replies »