Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic update statement

Hello,

it's possible to use a statement like this to change more values at the same time?

= 'Update table name Set _fieldname='& Chr(39) & '$(v_conto)' Where ID in  (1,2,3,4,5);' 

it seems that it does'nt work.

Any idea?

Thanks

4 Replies
jonas_rezende
Specialist
Specialist

Hi, araffaele.

This type of change you can make in the data source or turn it with the script functions. Example: Replace(), if().

Qlikview not is SQL, so, the statement above fails.

I believe the documents attacheds will help understand the data model and Script Qlikview.

Good luck!

Mahamed_Qlik
Specialist
Specialist

Hi Raffaele,

No. You can not use Where clause like this.

If you want permanent filter of data that can be done in script level.

Regards,

Mahamed

maxgro
MVP
MVP

this seems to work (or instead of in)

='Update Sales Set Year='& Chr(39)

& '$(vYear)'& Chr(39) & ', Month='& Chr(39) & '$(vMonth)' & Chr(39)

& ', SalesPerson='& Chr(39) & '$(vSalesPerson)'& Chr(39)& ', Sales='& Chr(39) & '$(vSales)'

& Chr(39)

& '  Where ID =2 or ID=4' 

&';'

I tried with this doc

Dynamic Update - Using Actions

Not applicable
Author

Thanks to all for replyes,

I solved using macros  ("for" cycle whith dynamic update command).