gpt4 book ai didi

progress-4gl - SELECT IN 语句的 ABL 等价物是什么

转载 作者:行者123 更新时间:2023-12-02 09:35:33 25 4
gpt4 key购买 nike

任何人请帮助我为 SELECT IN 声明等效的 ABL例如

SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...);

最佳答案

OR 显然是最简单的,但既然它已被宣布为 Not Acceptable ,也许这可以满足需要?

define variable i as integer no-undo.
define variable n as integer no-undo.
define variable cityList as character no-undo.

cityList = "boston,new york,chicago,...".

n = num-entries( cityList ).
do for i = 1 to n:
for each customer no-lock where city = entry( i, cityList ):
display customer.name customer.city.
end.
end.

这将避免表扫描并且与 OR 一样高效,因为字段比较是相等匹配。

关于progress-4gl - SELECT IN 语句的 ABL 等价物是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26607822/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com