insert_recordset 临时表
来源:互联网 发布:系统时间锁定软件 编辑:程序博客网 时间:2024/06/04 19:26
在lookup或者类中,用insert_recordset方法向临时表插入数据后,需要用select tmpTable来初始化临时表的buffer,数据才可以正常呈现。
如:
public static void lookupRate(FormStringControl _contrl, TNK_ToRisk_C _custAccount, TNK_LTSeiZhaCh_COCTR_C _costCenter, TNK_SB_C _itemId){ SysTableLookup sysTableLookup; Query q; QueryBuildDataSource qbds; TNK_BaseRate_C baseRate_C; TNK_RDB_JIGSOBA_UNT_SBT unt_SBT; TNK_TmpCustomerRate tmpCustomerRate; delete_from tmpCustomerRate; ttsBegin; insert_recordset tmpCustomerRate (JIGSOBA_UNT_SBT, SCBaseRate_C, LTSeiZhaCh_COCTR_C, ToRisk_C, SB_C) select BaseRate_C, SCBaseRate_C, LTSeiZhaCh_COCTR_C, ToRisk_C, _itemId from baseRate_C where baseRate_C.ToRisk_C == _custAccount && baseRate_C.LTSeiZhaCh_COCTR_C == _costCenter && baseRate_C.SCBaseRate_C // 特殊汇率 && baseRate_C.SYOUNINN_F // 已批准 exists join unt_SBT where unt_SBT.JIGSOBA_UNT_SBT == baseRate_C.BaseRate_C && unt_SBT.SB_C == _itemId; if(!tmpCustomerRate) { insert_recordset tmpCustomerRate (JIGSOBA_UNT_SBT, SCBaseRate_C, LTSeiZhaCh_COCTR_C, ToRisk_C, SB_C) select BaseRate_C, SCBaseRate_C, LTSeiZhaCh_COCTR_C, ToRisk_C, _itemId from baseRate_C where baseRate_C.ToRisk_C == _custAccount && baseRate_C.LTSeiZhaCh_COCTR_C == _costCenter && !baseRate_C.SCBaseRate_C // 非特殊汇率 exists join unt_SBT where unt_SBT.JIGSOBA_UNT_SBT == baseRate_C.BaseRate_C && unt_SBT.SB_C == _itemId; } ttsCommit; select tmpCustomerRate; q = new Query(); qbds = q.addDataSource(tableNum(TNK_TmpCustomerRate)); sysTableLookup = SysTableLookup::newParameters(tableNum(TNK_TmpCustomerRate), _contrl); sysTableLookup.addLookupfield(fieldNum(TNK_TmpCustomerRate, JIGSOBA_UNT_SBT)); sysTableLookup.addLookupfield(fieldNum(TNK_TmpCustomerRate, SCBaseRate_C)); sysTableLookup.addLookupfield(fieldNum(TNK_TmpCustomerRate, ToRisk_C)); sysTableLookup.addLookupfield(fieldNum(TNK_TmpCustomerRate, LTSeiZhaCh_COCTR_C)); sysTableLookup.addLookupfield(fieldNum(TNK_TmpCustomerRate, SB_C)); sysTableLookup.parmQuery(q); sysTableLookup.parmTmpBuffer(tmpCustomerRate); sysTableLookup.performFormLookup();}
阅读全文
0 0
- insert_recordset 临时表
- Insert_Recordset 用法举例
- 临时表空间&临时表&临时段
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 临时表
- 【数据结构与算法】刷题汇总 Python 版
- 以太网,IP,TCP,UDP数据包分析
- POI:根据单元格的自定义名获取单元格的位置
- http请求错误
- LAS格式点云读写
- insert_recordset 临时表
- 动态规划之配对链最大长度
- windows快递关掉8080端口进程
- 学习日记1211
- ffmpeg滤镜专题4-给视频嵌入水印
- 那些年,SQL遇到的坑
- 文章标题
- tensorflow graph 数据结构
- Vue基础(vue实例)