# SQLike routine

The SQLike routine contains functions which allow you to extract a part of a string.

You can access these functions by double-clicking the SQLike node under the system routines folder in the Repository tree view.

Functions of the SQLike routineFunctions of the SQLikeSQLike routine

| Function | Description | Syntax |
| --- | --- | --- |
| mid | Extracts a substring from a string, from the position specified by<br>beginIndex. The count parameter<br>specifies the number of characters to be extracted. If the<br>count is not provided, this function extracts the<br>substring from the position specified by beginIndex to the<br>end.<br><br>Example:<br><br><ul><li><span>SQLike.mid("abcdefg",3,3)</span></li> <li>Output: <span>cde</span></li></ul> | SQLike.mid(String instr,int beginIndex,[int count]) |
| mid\_index | Extracts a substring from a string. If count is positive,<br>the left most substring that contains count-1<br>delimiters is returned; if count is negative, the<br>right most substring that contains -count-1<br>delimiters is returned.<br><br>Example 1:<br><br><ul> <li><span>SQLike.mid_index("a,bc,d,e,f,g",",",3)</span></li> <li>Output: <span>a,bc,d</span></li> </ul><br><br>Example 2:<br><br><ul> <li><span>SQLike.mid_index("a,bc,d,e,f,g",",",-3)</span></li> <li>Output: <span>e,f,g</span></li> </ul> | SQLike.mid\_index(String instr,String delimiter,int count) |