Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

where condition

Hi All,

I am using below sript and fetching the data from Data base

it executes the script with error saying doesn't match  the where condition

error msesage

Literal does not match format string

where "ServiceDate">'43118'

Please someone can suggest me how do i write the wehere condition . here


Load

ServiceDate,

Dept,

Text(Item) as Item_Key ,

Product,

State

SQL SELECT

* FROM  "DTS_IP".Fact

Where ServiceDate > '$(vLast_Update_Date)';

Need help

Thanks in advance

1 Solution

Accepted Solutions
olivierrobin
Specialist III
Specialist III

hello

as usual with dates, you have to take care or the format or date fields

be sure that your field and the content of the variable have same date format

View solution in original post

6 Replies
shiveshsingh
Master
Master

Hi

Try this

Load

ServiceDate,

Dept,

Text(Item) as Item_Key ,

Product,

State;

SQL SELECT

ServiceDate,

Dept,

Item,

Product

FROM  "DTS_IP".Fact

Where ServiceDate > '$(vLast_Update_Date)';

olivierrobin
Specialist III
Specialist III

hello

as usual with dates, you have to take care or the format or date fields

be sure that your field and the content of the variable have same date format

smilingjohn
Specialist
Specialist
Author

HI Shivesh ,

Thanks for the reply it says

Literal does not match format string

where "ServiceDate">'43118'

smilingjohn
Specialist
Specialist
Author

Hi Robin,

The date format is same it is giving the below error message during the reload process as

Literal does not match format string

where "ServiceDate">'43118'


thanks

smilingjohn
Specialist
Specialist
Author

Hi Robin

Yes you are correct it is issue with the date format

Thanks

shiveshsingh
Master
Master

Then you need to check the format of the date