on 05-25-2007 11:07 AM
Hi All,
can JDBC adapter insert into a non-Char column in a table?
regards
Madhu
Hi,
Yes it can.
Actually for number you do not need any special settings,. but for characters you need to have a sepacial Attribute called hasQuot with value as No.
More,
http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
<i>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.</i>
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Madhu,
Assumiing this is the insert query you want to try,
<b>insert into tablename(ename,eno) values('bhavesh',123)</b>
Assuming ename is char and eno is a number. In this case for ename you need to use the attribute hasQuot = "Yes".
In this case, the output XML that goes to the JDBC adapter should be,
<root>
<statement>
<dbTableName action= "NSERT>
<table>realDbTableName</table>
<access>
<b><ename hasQuot= "Yes">Bhavesh</ename>
<eno>123</eno></b>
</access>
<dbTableName>
</statement>
</root>
Regards
Bhavesh
Check the link I have pointed above it explains the strucutre for Update as well,
http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Regards
Bhavesh
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.