项目中经常会遇到使用JDBC Adapter的方式直接插入或更新数据库的需求,在这里记录一下,省得时间长不做又忘了。PI中如果使用JDBC Receiver Adapter,在定义Data Type时必须遵循一定的格式,而且根据Action(Delete、Update、Insert等)不同,格式也不完全一致。具体的格式可以参照:http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
先按照所要做的操作在ESR中建立对应的数据类型,我做的是先删除表数据,然后插入新数据,(因为客户之前提了个这样的需求,所要先做个例子试试),Data Type如下:
第一个Statement 是为了删除表数据,因为是要全部删除,所要没加Key的结构,如果是有条件的删除,要在table后再加一个Key的,指定删除条件;第二个Statement是为了插入数据,在这里如果Action是用Update_Insert,也要加Key的结构,指定更新条件。
重要的是Message Mapping,其中Action可根据要求赋值:INSERT、UPDATE、SELECT或UPDATE_INSERT等。Table是可选的,如果用了在这里赋值你要操作的表名既可。还有一点,我用的是Oracle数据库,当表里有日期类型的字段时,是要先在Mapping中做一下To_Date的转换,同时要给hasQuot属性赋值yes|no,否则会报错。
hasQuot= YES|NO During construction of the WHERE condition of the SQL statement, the table column type determines whether the default is to set the values in quotation marks (text column types) or not (numerical column types). In a few cases (for example, when using functions), it may be necessary to override this. This attribute enables you to do this. If YES, quotation marks are always set round the values for which this attribute is set in the SQL syntax. If NO, quotation marks are never set. Only use this attribute in individual cases.
如果是日期时间型:
- 大小: 62.1 KB
- 大小: 124 KB
- 大小: 30.2 KB
分享到:
相关推荐
NULL 博文链接:https://zhangyy327.iteye.com/blog/1152267
对于想要通过URL地址将数据发送到接收方的传输方式,PI HTTP Receiver Adapter的配置要稍微复杂一点,首先要在Message Mapping的时候将需要通过URL地址传输过去的参数用Dynamic Configuration函数转换一下,如下图:
删除 Citrix Receiver for Windows 您可以使用 Windows 的“程序和功能”实用工具(添加/删除程序)卸载 Receiver。 注意:如果曾使用 Citrix Receiver Updater 安装 Receiver,请勿使用此方法。 在某些情况下,卸载...
7.1 Administration 7.1.1 Central Administration Tool 7.1.2 SAP NetWeaver Administrator 7.1.3 SAP NetWeaver Application Server Java 7.1.4 SAP Process Integration Monitoring (pimon) 7.1.5 SAP ...
citrix receiver for mac
Sender-receiver 消息 ,还是老话,学习JMS和activemq必看资料一直
simple FM receiver in Matlab
EventReceiver注册工具,Dll文件需要手动加入assembly文件里,然后重启IIS
CitrixReceiver.dmg
syslog receiver syslog接收测试工具 MegaLogSyslogTestReceiverV2.zip
GNSS receiver and the receiver clock offset from measurements of at least four pseudoranges.
CitrixReceiver.exe
最新版 Citrix Receiver,最新版 Citrix Receiver ,方便安装后完可以连接服务器。
itrix Receiver是一种轻便的通用软件客户端,itrix Receiver(虚拟桌面软件)是一款非常优秀的专业的虚拟桌面软件。Citrix Receiver强大实用,操作简便,为您带来高清用户体验,高效的移动办公,可以兼容任何设备上的...
MirrorOp Win Receiver V 0.2.17.8
CitrixReceiver
Citrix Receiver卸载不了吗?请尝试下载该工具,可以轻松帮你卸载。
CitrixReceiver 的老版本,支持Xp 系统登录,官网获取。