You can use the InStr function to judge a string to determine whether it contains the specified character.
Its syntax is:
InStr (Sourcestring,deststring,start,appearposition). InStr (' Source string ', ' target string ', ' Start position ', ' first
Usage of InStr and SUBSTR in Oracle
Usage of instr in Oracle:
The format of the InStr method is
INSTR (The source string, the string to find, starting with the first few characters, to find the ordinal number of matches)
Returns the location found,
Usage of instr in Oracle:The format of the InStr method isINSTR (The source string, the string to find, starting with the first few characters, to find the ordinal number of matches)Returns the location found, or 0 if it is not found.For example:
Instr usage in Oracle:The format of the instr method isInstr (source string, the string to be searched, starting from the nth character, to find the nth matching serial number)Returns the location found. If not, 0 is returned.For example, in instr ('
The Oracle InStr function appeared in the recent project, so I looked up information about it on the Internet.Usage of InStr and SUBSTR in OracleUsage of instr in Oracle:The format of the InStr method isINSTR (source string, the string to find,
An example of the character location (instr) retrieved by the oracle character truncation (substr) is as follows: substrinstr
I. Theory
Oracle truncation character (substr), search character location (instr) case when then else end statement use
Oralce functions substr and mysql functions substring_index note ???? Recently, I occasionally saw the substring_index function in the mysql database. First, I would like to briefly introduce the substring_index function of mysql .???
Select Riskcode,outriskcode,riskname,suppliercode, (select min (inputdate) from Fccont where Innercontno in (select Innercontno from Fcpol where Riskcode=t.riskcode and Biztype= ' "and Corporation in (' 1137000003 ', ' 1137000004 '))) from Mr ISK T
Attention:If String2 is not found in String1, the InStr function returns 0.Example:SELECT InStr (' Syranmo ', ' s ') from dual; --Return 1SELECT InStr (' Syranmo ', ' RA ') from dual; --Return 31 SELECT InStr (' Syran Mo ', ' a ', up to) from dual; -
Abstract: During the development project, a problem occurs: the data obtained from the remote server is composed of a regular string, but what you want is not the string, it is a string, So it uses the powerful Oracle functions. My problem is this.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.