在进度应用程序中运行直接 sql 语句的语法是什么?
SELECT count(distinct myField2) FROM myTable WHERE myField = myVariable);
我已经想出了如何使用 for each 来做到这一点,但我仍然想运行这个命令。对每个使用一个:
def var iTmpCount as int no-undo.
for each myTable no-lock where myField = myVariable break by myField2:
if first-of (myTable.myField2) then
iTmpCount = iTmpCount + 1.
end.