cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
179
Views
0
Helpful
0
Comments
cdnadmin
Community Member

Subject: RE: How to do bulk inserts
Replied by: David Staudt on 15-10-2010 06:00:48 PM
The UCM database is Informix IDS 10, reference here: http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp
 
It looks like IDS does not support the syntax macro with multiple rows in VALUE.
 
The following format with multiple inserts in one transaction seemed to work without issue on my UCM 8.0(1) lab, however:
 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:executeSQLUpdate sequence="1">
         <sql>insert into enduser (lastname,userID,pkid) VALUES('testUser1','testUser1',newid());
              insert into enduser (lastname,userID,pkid) VALUES('testUser2','testUser2',newid());</sql>
      </ns:executeSQLUpdate>
   </soapenv:Body>
</soapenv:Envelope>

 
This document was generated from CDN thread

Created by: Lizabeth Li on 15-10-2010 05:05:43 PM
Hi, I'm trying to do a bulk insert into the enduser table, but the db doesn't seem to accept conventional SQL syntax.  My statement is
 
INSERT INTO ENDUSER (firstname, lastname, tkuserlocale, userid) VALUES ('M','A',1,'M.A'),('C','C',1,'C.C');
 
but I get this error in return
   
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="[url=http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>A]http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>A syntax error has occurred.</faultstring><detail><axl:Error xmlns:axl="[url=http://www.cisco.com/AXL/API/1.0"><axl:code>-201</axl:code><axl:message>A]http://www.cisco.com/AXL/API/1.0"><axl:code>-201</axl:code><axl:message>A syntax error has occurred.</axl:message><request>executeSQLUpdate</request></axl:Error></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
 
It works when I take the 2nd record away, and only insert 1 record.  Is there a way to do bulk inserts into the tables?  Or do I have to write 1 insert for every record?  There must be a better way than that...
 
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links