XSharpPublic
XSharpPublic copied to clipboard
[VFP] Cursor operation - SQL DELETE
Describe the bug xSharp-Error for Delete Command
To Reproduce Code to reproduce the behavior:
FUNCTION check_cursor AS VOID
create cursor abc (mkey i, mident c(10))
insert into abc (mkey,mident) values (1,"a")
insert into abc (mkey,mident) values (2,"b")
insert into abc (mkey,mident) values (3,"c")
create cursor def (mkey_fk i,mtext c(10))
insert into def (mkey_fk,mtext) values (1,"inf1")
insert into def (mkey_fk,mtext) values (1,"inf2")
insert into def (mkey_fk,mtext) values (2,"infA")
insert into def (mkey_fk,mtext) values (3,"to_del")
insert into def (mkey_fk,mtext) values (4,"to_del")
delete FROM def WHERE mkey_fk = 4
delete FROM def WHERE "to_del" $ mtext
RETURN
Expected behavior Complete support of VFP-DELETE Command.
We support the IN clause and FOR for filtering rows.
If you add the following to your header file or at the start of the prg then it works:
#command DELETE [<*clauses*>] WHERE [<*moreclauses*>] => DELETE <clauses> FOR <moreclauses>
#command DELETE FROM <(a)> [<*clauses*>] => DELETE <clauses> IN <a>