updateBySQL
Description
Updates features in a table by performing a query on a table using an MI SQL Update command string. In some cases the table will need a primary key column, depending on the data provider and the query. See the MapInfo SQL Language Reference for detailed information on MI SQL commands and functions.
ACL Authorization Flow
To update features in a named table by performing a query on a table using an MI SQL Update command string, the user (or the role they belong to) needs both EXECUTE and MODIFY permission on the Named table.
Messages
The following table lists the request and response messages for the updateBySQL operation.
Click on a message name to get more information about the message.
Message | Description |
---|---|
UpdateBySQLRequest | The request message for the updateBySQL operation. |
UpdateBySQLResponse | The response message for the updateBySQL operation. |
Example
Example request for updating features in a table using the MI SQL Update command with a bound parameter:
<UpdateBySQLRequest
xmlns:ns2="http://www.mapinfo.com/midev/service/featurecollection/v1"
xmlns:ns3="http://www.mapinfo.com/midev/service/style/v1"
xmlns:ns4="http://www.mapinfo.com/midev/service/geometries/v1"
xmlns:ns5="http://www.mapinfo.com/midev/service/table/v1"
xmlns:ns6="http://www.mapinfo.com/midev/service/feature/v1">
<ns6:SQL>update "/MyTable" set ID = ID + 3, StringCol = 'Val' + (ID + 3), IntCol = (ID + 3) * @param1</ns6:SQL>
<ns6:BoundParameterList>
<ns6:BoundParameter name="param1">
<ns6:Value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:IntValue">
<ns2:Value>100</ns2:Value>
</ns6:Value>
</ns6:BoundParameter>
</ns6:BoundParameterList>
</UpdateBySQLRequest>