Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody.
I´d like to have a little help with this function, i´ve read a few posts but i still didnt understand.
I have this in the script, and i dont understand what it is.
IF(LEN(CUENTA)>2,lookup('CUEN_NOMBRE', 'CUENTA_AUX',LEFT(CUENTA,2), 'CUENTAS_TMP')) AS GRUPO_NOMBRE_2 |
Here an example of the values
CUEN_NOMBRE = activo
Cuenta_aux = 1
Cuenta= 1-1
and cuentas_tmp is a table.
Thank you all.
IF(LEN(CUENTA)>2,lookup('CUEN_NOMBRE', 'CUENTA_AUX',LEFT(CUENTA,2), 'CUENTAS_TMP')) AS GRUPO_NOMBRE_2: |
Return The value in the field CUEN_NOMBRE From the table CUENTAS_TMP Where the value Left(CUENTA,2) (first 2 characters) match in the field CUENTA_AUX
IF(LEN(CUENTA)>2,lookup('CUEN_NOMBRE', 'CUENTA_AUX',LEFT(CUENTA,2), 'CUENTAS_TMP')) AS GRUPO_NOMBRE_2: |
Return The value in the field CUEN_NOMBRE From the table CUENTAS_TMP Where the value Left(CUENTA,2) (first 2 characters) match in the field CUENTA_AUX
Thank you! Now i have a little doubt about this parte.
Where the value Left(CUENTA,2) (first 2 characters) match in the field CUENTA_AUX
What do you mean with match? that there are the same values? sory but i don´t have a good english
Cheers.
Yes , the first time they have the same values you have the field returned.
Thanks