I got stuck in one scheme account's problem. Maybe someone could know easily how to do the following:
I have the following table with the number of the scheme account, the number of the account, and a flag which indicates if the account number has the maximum digits (in this case 7, but is completely dynamic).
I want to create another table with the number of accounts which hasn't the max_length, and I want to add to them as many '0' (for minimum value) and as many '9' (for maximum value) as it would be necessary.
I did it in a static way :
N_Fila as N_Fila2,
N_Fila_Cuenta&'0000' as N_Fila_Cuenta_Min,
N_Fila_Cuenta&'9999' as N_Fila_Cuenta_Max
resident Cuentas_Mayor4 where (Max_Length_Cuenta = 0);
And I got the desired result in the following table :
I have in a variable the value of the maxLength. The point to do this is easy, it's just add as many '0' as the result of maxLength - len(currentCount), but I don't know how to do it in Qlikview.