我试图解决这个问题最近几天,但不知道该怎么做。我正在尝试从列的表中获取3条记录。如果有任何Informix 4GL大师出现,我需要一些帮助。I4GL循环查询
declare s_curs cursor for
SELECT * FROM crcharge
WHERE chargenum IN
(SELECT shtwrd_no FROM crbookid WHERE crbookid.book_no = rpt.book_no)
let chgkey_count = 1
FOREACH s_curs into z_charge.*
let t_col = 15
if chgkey_count <= 3 then
let chgkey_count = chgkey_count + 1
let chgkey_count = t_chgkey
let scratch = z_charge.chgkey
let rpt.chgkey = scratch
call make_charge_section(scratch) returning rpt.chgkey
print
column 1, ESC, "&a15.5R",ESC,"&a12C", rpt.chgkey #t_col+2 ,
end if
END FOREACH
挣扎,看看这是什么,但是这让chgkey_count = chgkey_count + 1,接着用let chgkey_count = t_chgkey,有点跳出代码.. –
你的术语是犯罪嫌疑人;您无法从列中获取记录,但您可以从表中获取记录。 –