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: 
Anonymous
Not applicable

Load with a where clause

Hi,

The syntax gives an error below

SQL##f - SqlState: S1000, ErrorCode: 4294757240, ErrorMsg: [DataDirect][ODBC OPENEDGE driver][OPENEDGE]Syntax error in SQL statement at or about "DATE(trndat,'dd/MM/yyyy')>= '2010/01/01'" (10713)

SQL SELECT *

FROM PUB.uwm100

/////////////////////////////////////////////////////////////////////////////

load

    a,

    b,

    c,

DATE(trndat,'dd/MM/yyyy') as %DATE;

SQL SELECT *

FROM PUB.uwm100

DATE(trndat,'dd/MM/yyyy')>= '2010/01/01';

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Guys,

Finally resloved it.

load

    a,

    b,

    c,

DATE(trndat,'dd/MM/yyyy') as %DATE;

SQL SELECT *

FROM PUB.uwm100

WHERE trndat >= ' 31/12/2010;

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Probably it is

DATE(trndat,'dd/MM/yyyy')>= '01/01/2010';

Anonymous
Not applicable
Author

Hi

change the format but the error still persist

Not applicable
Author

Hi,

Try with this

LOAD

    a,

    b,

    c,

    DATE(trndat,'dd/MM/yyyy') as %DATE

WHERE trndat >= MakeDate(2010, 1, 1);

SQL SELECT *

FROM PUB.uwm100;

Not applicable
Author

Its probably because '2010/01/01' is not treated as date in your database (is it SQL Server/Sybase ?)

You can probably modify your where clause as;

WHERE datediff('2010-01-01', date(trndat,'dd/MM/yyyy')) >= 0

Regards

Vikas

Anonymous
Not applicable
Author

Hi Guys,

Finally resloved it.

load

    a,

    b,

    c,

DATE(trndat,'dd/MM/yyyy') as %DATE;

SQL SELECT *

FROM PUB.uwm100

WHERE trndat >= ' 31/12/2010;