我有一个名为CalculationFunctionGroup
的OrientDB表,其中有一个名为functions
的字段。
此字段具有以下JSON内容:
[{"@type":"d","@version":0,"@class":"CalculationFunction","name":"AR_0015_0280","code":"//AR_0015_0280 OTTIMIZZATA / FORMATTATA\nvar worka01 = anagPay(\"AR_0015_0280\", -1);\nreturn worka01;","language":"Javascript"}]
我想在JSON的code
元素上提取满足LIKE条件的行。
我已尝试过此查询:
SELECT FROM CalculationFunctionGroup
WHERE functions.code LIKE '%OTTIMIZZATA%'
但是提取的行数是零!
答案 0 :(得分:0)
试试这个:
select expand(distinct(rid))
from (select @rid,functions.code
from CalculationFunctionGroup unwind functions)
where functions like "%OTTIMIZZATA%"