Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator II
Creator II

"Error in expression: ')' expected" while loading script

Hi all,

I am trying to load below expression ,getting error saying "Error in expression: ')' expected" but i have made sure every thing is fine,whats making me get this error.

CurrentCampaignData:

Load

batch_meta_data_id,

campaignid as current_campaign_id

Resident CAMPAIGN Where ((current_start_date = Date(weekstart(Num(today()))+1)) and batch_meta_data_id = (23,24,25));

Please help me in this regard.

Thanks,

Supriya

1 Solution

Accepted Solutions
Kushal_Chawda

As jontydkpi mentioned, make correction in your syntax

Resident CAMPAIGN

WHERE (current_start_date = Date(weekstart(Num(today()))+1)) and match(batch_meta_data_id ,'23','24','25');

View solution in original post

11 Replies
Chanty4u
MVP
MVP

Hi,

CurrentCampaignData:

Load

batch_meta_data_id,

campaignid as current_campaign_id

Resident CAMPAIGN Where ((current_start_date = Date(weekstart(Num(today())+1)) and batch_meta_data_id = (23,24,25));

berryandcherry6
Creator II
Creator II
Author

Hi,

thanks for your reply

But having same issue

Chanty4u
MVP
MVP

try

Resident CAMPAIGN Where ((current_start_date = Date(weekstart(Num(today()+1))) and batch_meta_data_id = (23,24,25));

berryandcherry6
Creator II
Creator II
Author

Hi,

Showing same error.

jonathandienst
Partner - Champion III
Partner - Champion III

This is invalid syntax:

batch_meta_data_id = (23,24,25)

The where clause should probably be:

Where current_start_date = Date(weekstart(Num(today()+1)))

     and Match(batch_meta_data_id, 23,24,25);

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
anagharao
Creator II
Creator II

As batch_meta_data_id is a integer and not a string , 'in' clause or structure will lead to an error.

use:

Resident CAMPAIGN Where ((current_start_date = Date(weekstart(Num(today()))+1)) and MATCH(batch_meta_data_id, 23, 24,25));

Kushal_Chawda

As jontydkpi mentioned, make correction in your syntax

Resident CAMPAIGN

WHERE (current_start_date = Date(weekstart(Num(today()))+1)) and match(batch_meta_data_id ,'23','24','25');

berryandcherry6
Creator II
Creator II
Author

Hi kushal chawda,

Thanks it worked,

Can i pass this obtained values from this table to set analysis,to evaluate ?

Kushal_Chawda

yeah, You can pass these values to set analysis if you don't want to use in WHERE clause