1
我的sql语句是动态生成的。 我有类似检索dynamicaly记录的列
strSql := 'select name, tel, adress, activity_id as filtre_1, country_id as filtre_2, ... from ... where ...'
我可以有1到n过滤和FILTER_1可以不重要被ACTIVITY_ID为COUNTRY_ID,订单。
如何检索filter_1,filter_2的值,因为我不知道有多少请求发回?
Normaly来获取值,我做的:
FOR rowResult IN EXECUTE strSql LOOP
name := rowResult.name
tel := rowResult.tel
adress := rowResult.adress
filtre_1 := rowResult.filtre_1
filtre_2 := rowResult.filtre_2
END LOOP;
由于这不能做,我喜欢做这样的事情
FOR rowResult IN EXECUTE strSql LOOP
name := rowResult.name
tel := rowResult.tel
adress := rowResult.adress
filtre_1 := rowResult("filtre_1")
filtre_2 := rowResult("filtre_2")
END LOOP;
但rowResult(stringfield)
不存在。
有人有想法吗?
感谢
这个想法很好,但显然我做了错误的事情,因为它不适合我: –
你试过了一个小提琴演示吗? –
这里是我的临时变量的结果: 注意:temp = {10,“”,“”,“”,“”“”,“\”ABC 1.3.1.1 \“”,“”,33,42 ,“”,“”,14,FILTRE,12,FILTRE,“”,FILTRE,7,FILTRE} 当我尝试阅读coloumn 11时,出现此错误消息: 错误:无法下标类型文本,因为它不是一个数组 –