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

Update statement not working

Hi ,

I am using dynamic updates and trying to execute the following sql statement:

"Update [Data] set Category = 'Revenue' where [Line Description] like '*" & descfilter.text &+ "*' AND Category ='Other';"

I get the error

error.PNG

Can someone help here?

Thanks in advance

Regards,

T

3 Replies
swuehl
MVP
MVP

Try

='UPDATE [Date] SET Category = ''Revenue'' WHERE [Line description] LIKE ''*' & descfilter.text & '*'' AND Category = ''Other'';'

Note that I used two single quotes e.g. around Revenue and Other (escaped the single quote), i.e. where ever it looks like double quotes, I've used two single quotes.

Put this expression in a text box. Assuming your descfilter.text shows a unique value like TEST, you should see

UPDATE [Date] SET Category = 'Revenue' WHERE [Line description] LIKE '*TEST*' AND Category = 'Other';

This is how your dynamic update statement should look like, right?

Now copy the full expression into the action statement.

Not applicable
Author

Hi swehl,

Thanks for your reply

Now its says expected WHERE clause in the Update statement.

Regards,

S

swuehl
MVP
MVP

Can you post the ouput of the expression when put into a text box?