所以我有一个调用程序的工具。 工具看起来像这样:
call Attach_test('select TTID from alerts.status where Class in (73000,8891) and to_int(TTID) > 0 and ServerSerial in ($selected_rows.Serial)',[ $selected_rows.Serial ]); flush iduc;它应该获得TTID(该字段只有许多选定的警报之一)和所选警报的服务器序列数组。 然后所有这些数据都转移到SQL过程,如下所示:
declare tempservser integer; k integer; begin for k = 1 to array_len(serserial) do begin set tempservser = serserial[k]; update alerts.status set ParentTT = parentttid, TTFlag = 2 where ServerSerial = tempservser and TTID = '' ; end; end参数:
在parentttid Char(11) 在整数的serserial数组中这就是麻烦 - 程序什么都不做。 没有错误或其他内容,但所选警报没有更新。
我希望它能像这样工作 - 你选择了许多只有一个有TTID的警报,运行这个工具,在所有其他选定的警报上设置ParentTT = TTID。 OS版本 8.1
对不起我的英语不好
So i have a tool that call procedure. Tool looks like that:
call Attach_test('select TTID from alerts.status where Class in (73000,8891) and to_int(TTID) > 0 and ServerSerial in ($selected_rows.Serial)',[ $selected_rows.Serial ]); flush iduc;it should get TTID (that field have only one of many selected alarms ) and array of server serials of selected alarms. Then all this data is transfered to SQL procedure that looks like:
declare tempservser integer; k integer; begin for k = 1 to array_len(serserial) do begin set tempservser = serserial[k]; update alerts.status set ParentTT = parentttid, TTFlag = 2 where ServerSerial = tempservser and TTID = '' ; end; endParameters:
in parentttid Char(11) in serserial array of IntegerAnd here comes the trouble - procedure do nothing. There is no errors or something but there is no update on selected alarms.
I want it to work like this - you select many alarms with only one that have TTID, run this tool that set ParentTT = TTID on every other of selected alarms. OS ver. 8.1
Sorry for my english
最满意答案
我想出了怎么做:
工具
call AttachSelectedToTTID([ $selected_rows.Serial ],[ $selected_rows.ParentTT ]); flush iduc;程序
declare tempservser integer; k integer;n integer;partt char(15); begin for n = 1 to array_len(ttid) do begin if (ttid[n] != '' ) then set partt = ttid[n]; end if; end; for k = 1 to array_len(serserial) do begin set tempservser = serserial[k]; update alerts.status set ParentTT = partt,TTFlag = 2 where Serial = tempservser and TTID = ''; end; end参数:
在Ttid数组Char(15)
在整数的serserial数组中
I figured out how to do it:
Tool
call AttachSelectedToTTID([ $selected_rows.Serial ],[ $selected_rows.ParentTT ]); flush iduc;Procedure
declare tempservser integer; k integer;n integer;partt char(15); begin for n = 1 to array_len(ttid) do begin if (ttid[n] != '' ) then set partt = ttid[n]; end if; end; for k = 1 to array_len(serserial) do begin set tempservser = serserial[k]; update alerts.status set ParentTT = partt,TTFlag = 2 where Serial = tempservser and TTID = ''; end; endParameters:
in ttid array of Char(15)
in serserial array of Integer
更多推荐
发布评论