sc_exec_sql

sc_exec_sql(“select replace(ntarjeta, substring(ntarjeta ,1,4),’****’) from contratos”);

What am I doing wrong?
The onLoad and incluto in the form field does not change.
Maybe I have to assign where you need to replace?
Sorry for my English

thanks

que estas intentando hacer? yo creo que debes usar el sc_lookup.

With exec sql you cannot select data, just use insert, delete or update. This function is not returning a sql cursor. What are you trying to do?

Tengo un campo que recoge el numero de una tarjeta, lo que quiero es que cuando muestre el n?mero oculte todo menos los ultimos 4 digitos.
I have a field that contains the number of a card, what I want is that when it shows the number hide all but the last 4 digits.

usa esta sentencia:
sc_lookup(data, “select concat(left(ntarjeta, length(ntarjeta) - 4),’****’)) from contratos”);

y recorres el cursor data.

hola que tal? alguien sabe si es posible ejecutar multiples codigos sql usando la macro sc_exec_sql? si es asi de que forma? es que he intentado y nada

Not sure. exec_sql don’t works for me, discovered today. You can try concatenating sentences like and see if works.

sc_exec_sql(data, "insert into tablea (name) values ("hello); insert into tableb (name) values (“hello)”);