Buenos días.Quiero hacer un borrado de CARTERA por filtro pasandome el cod.
Tabla CUENTA : id,cod.
Tabla CARTERA: id,idc,des.
este es el código

Los demás filtros me funcionan).
Código SQL
[-]
vsql:= 'DELETE FROM CARTERA ';
VWHE:='';
vsql:= vsql + 'INNER JOIN CUENTA ON CUENTA.ID = CARTERA.IDCTA ';
if Fvacio(Edesde.Text)=false then
begin
if vwhe <> '' then
vwhe:= vwhe + ' and CUENTA.COD >='+ quotedstr(Edesde.text)
else
vwhe:= 'where CUENTA.COD >='+ quotedstr(Edesde.text);
end;
if Fvacio(Ehasta.Text)=false then
begin
if vwhe <> '' then
vwhe:= vwhe + ' and CUENTA.COD <='+ quotedstr(Ehasta.text)
else
vwhe:= 'where CUENTA.COD <='+ quotedstr(Ehasta.text);
end;
vsql:=vsql + vwhe;
ib.Active:=false;
ib.DELETESQL.Clear;
ib.DELETESQL.Text:=vsql;
ib.active:=true;
ib.Delete;
t.commit;
y este es el error:
Dynamic Sql error sql = -104 token unknow line 1,char 21 INNER'
Seguro que es una gilipollez pero no lo veo.