Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

blaise
Contributor III

issue with value from qvd

Hi community

I have developed an app that check if the data found in two QVD's are identical ("cell-by-cell").

I do this by creating a PK field for both QVDs and then join the crosstabled data and afterwards only keep values where QVD1_VALUE <> QVD2_VALUE (all scripting)

My Qv App founds some lines where the value differ but the problem is that i cannot find the difference myself.

For some reason QVD1_VALUE differs from trim(QVD1_VALUE) but both len(QVD1_VALUE) and len(trim(QVD1_VALUE)) returns the same (8). The value is treated as a numeric value (isnum).

Can anyone share some lights on why QVD1_VALUE doesn't equal trim(QVD1_VALUE) ??

And yes, the purpose of the application is to verify that QVD1_VALUE eq. QVD2_VALUE but i have narrowed it down to some sort of issue with QVD1_VALUE (as a trim(QVD1_VALUE) eq. QVD2_VALUE)

Looking forward for some answers

br Johan

Tags (3)
2 Replies
blaise
Contributor III

Re: issue with value from qvd

FYI, I have verified that the memory statistics for these two fields are identical

boorgura
Valued Contributor

Re: issue with value from qvd

Have no perfect answer for this.

My thoughts (just thinking out loud):

I believe the value itself is a number, whereas trim() function returns a string.

try type casting them in the script to all "TEXT".

Even on the UI --> if(text(QVD1_VALUE) <> trim((QVD1_VALUE)),'diff','ok') --> this works OK.

Community Browser