Oracle queries do not include parentheses and methods that do not contain the specified characters _oracle

Source: Internet
Author: User

An Oracle query without parentheses does not contain the specified characters in a record method as follows:

 With tmp_t as (
 Select 1 as ID, ' Test 4321_cs ' as name from dual UNION ALL
 Select 2, ' Test 1200 (Beta) ' from dual Union all<  C3/>select 3, ' Test 123 (Beta) ' from dual union ALL
 Select 4, ' Test 1212 (D2) ' from dual union ALL
 Select 5, ' Test 1212 (D2) Beta ' From dual UNION ALL
 Select 6, ' Test 123 ' from dual '
 select *
  from tmp_t
 where InStr (name, ' _cs ') = 0
  D regexp_instr (Name, ' (. *) ') = 0 and
  regexp_instr (name, ' (. *\) ') = 0

The results are:

Where Regexp_instr is a regular expression function supported by Oracle, it functions like instr. The records that contain parentheses () and () are matched here.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.