Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this code
load
Code,
Name,
Place,
Country
from ABC.qvd;
now lets say the field Code has values starting from 100 to 300 .
i want to use the above ABC.qvd for the second time , but i want to replace the code with the value 105 with 705..how can i do it in the back end
thx
B
Hi Bairaj,
Just use a conditional to change that value.
load
If(Code = 105, 705, Code) AS Code,
Name,
Place,
Country
from ABC.qvd;
Is that what you are after?
Miguel
Ok, I'm assuming you want to load each Code as "Code + 700" - if not this will need to be tweaked:
load
Code,
Name,
Place,
Country
from ABC.qvd;
CONCATENATE
load
Code + 700 as Code,
Name,
Place,
Country
from ABC.qvd;
Hi Bairaj,
Just use a conditional to change that value.
load
If(Code = 105, 705, Code) AS Code,
Name,
Place,
Country
from ABC.qvd;
Is that what you are after?
Miguel
Thank you Miguel, that is what i was looking for.
I have heard " if", is not preferred from performance pt of view( When dealing with huge amount of data ) , so i was thinking , does QV provide a function instead of using if condition.
Hi Bairaj,
Not in this case, where the If(), Match() or ApplyMap() should you need to change lots of values. It indeed will slow a bit your document but this is part of the development. The more tasks the script does, the faster your expressions will perform in your charts.
Hope that makes some sense.
Miguel