Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Update Sintax

I use a Dynamic Update for updating data :

This string works  : UPDATE MovimentiFinanziari SET PrendiNonPrendi = 'S'   WHERE DataMovimentoTXT = 'D2013091';

This string NOT works : UPDATE MovimentiFinanziari SET PrendiNonPrendi = 'S'   WHERE DataMovimentoTXT > 'D2013091';

The difference is the comparison operand of WHERE clause.

It seems that the operator '='  is OK but the operator '>' is not supported

Can anyone help me? ?

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I doubt it's the > operator. You're trying to compare string values. Possibly > is a not supported operator for strings in dynamic updates.


talk is cheap, supply exceeds demand
flipside
Partner - Specialist II
Partner - Specialist II

It's strange but the > and < operators work in my version, QV11.2 SR3.

I suppose another way might be to reference variables in your dynamic command to only use the = operator, maybe something like ...

 

UPDATE MovimentiFinanziari SET PrendiNonPrendi = 'S' WHERE SubStringCount(vVar,DataMovimentoTXT)=1;

... and vVar is a distinct, and ordered ascendingly, concatenated list of values split at the relevant point ...

=subfield(concat(distinct DataMovimentoTXT,';',DataMovimentoTXT),vGT,-1)

... and vGT is a variable holding the 'greater than' value.