Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field A with values like this: 00123, 00234, 022, 33, 234M, PSR44
I need the zeroes before the fields to go, so i get a set of values that looks like this: 123, 234, 22, 33, 234M, PSR44
I can do this in excel by multiplying by 1 and using an iferror statement that shows the original statement in case of an error (for values with letters)... How can i do this in QV? (I kno i can multiply the field by 1 while importing, is there an equivalent of iferror that i can use there?)
Thanks!
Hi,
Use as follows in the load script:
Alt(Num(FieldA), FieldA) AS FieldA
The Alt() function will return the first numeric value that returns true. Num(000234) returns 234 removing the leading zeroes, so that should work. If the value is not numeric, the it returns the same value.
Hope that helps.
Miguel
Hi,
Use as follows in the load script:
Alt(Num(FieldA), FieldA) AS FieldA
The Alt() function will return the first numeric value that returns true. Num(000234) returns 234 removing the leading zeroes, so that should work. If the value is not numeric, the it returns the same value.
Hope that helps.
Miguel
And if i ant to rename field A to field X while doing all of the above?
write the field as field A as [field x]
Sampath
Hi,
In the statement given by Miguel you will find the Word FieldA, this is nothing but a new name for field A.
You rename the field with Keyword "As".
Hope this is clear
Regards,
Kaushik Solanki