Hi developers!
There is a neat feature of ObjectScript classes - Query element, which allows you to write in a clear SQL (without any & or ()), pass parameters to it and call it from ObjectScript as do QueryNameFunc() or via Call SQLProcedureName via SQL, .e.g.
Query MyQuery(p as%String) as%SQLQuery [SQLProc]
{
SELECT * FROM MyTable
WHERE Name=:p
}All works fine, but when I tried to use the same for a DELETE statement see the following error:
SELECT expected, DELETE found ^ DECLARE Q1 CURSOR FOR DELETE
Is the Query element for SELECT only? What am I doing wrong? )
.png)
.png)
.png)
.png)
.png)
.png)
.png)
