Excel Functions - Use of substitute Substitute Function

In Excel, the substitute function is to replace the specified text in a string, which is equivalent to replace() in Java.

usage:

=substitute(text, old_text, new_text, [instance_num])

text: the string in which the specified text is to be replaced;

old_text: the old text that was replaced;

new_text: new text to replace the old text;

instance_num: replaces the first occurrence of old_text, if not specified, replaces all old_text by default.

 

Applications:

1. For historical data, a part of shopId needs to be manually inserted into a piece of data, there is no rule for shopId;

INSERT INTO `T_WORDINFO` (`WORDINFOID`, `VERSION`, `NAME`, `CONTENT`, `ISDELETE`, `SEQUENCE`, `ISSHOW`, `SHOP_ID`) VALUES (19, 0, 'Reserved text information' , '<p>\r\n Reserved text information</p>', 0, 14, 0, {shopId});

 Replace {shopId} with 210, 220, 230, 338, 239, 319...N numbers with no pattern.

 

 

As shown in the figure above, select the C3 cell where the formula has been written and drop down, you can get all the SQL statements of shopId.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326948059&siteId=291194637