Table of Contents

Search

  1. Preface
  2. Introduction to PowerExchange
  3. DBMOVER Configuration File
  4. Netport Jobs
  5. PowerExchange Message Logs and Destination Overrides
  6. SMF Statistics Logging and Reporting
  7. PowerExchange Security
  8. Secure Sockets Layer Support
  9. PowerExchange Alternative Network Security
  10. PowerExchange Nonrelational SQL
  11. PowerExchange Globalization
  12. Using the PowerExchange ODBC Drivers
  13. PowerExchange Datatypes and Conversion Matrix
  14. Appendix A: DTL__CAPXTIMESTAMP Time Stamps
  15. Appendix B: PowerExchange Glossary

LIKE Comparison

LIKE Comparison

This comparison is a pattern-matching comparison. The comparison is true if the column name matches the pattern.
Example:
col1 [NOT] LIKE pattern
The pattern is a character constant of 255 characters or less that contains any combination of characters within which the percent sign (%) and the underscore character (_) have special significance:
  • % represents a series of zero or more arbitrary characters. Entering %% is the same as entering %.
  • _ represents exactly one arbitrary character.
  • Any character other than % or _ represents a single occurrence of that character.
  • Trailing blanks in the column or in the pattern will be ignored for comparison purposes.
The following table lists example patterns, column names that match the pattern, and column names that do not match the pattern:
Pattern
Matches
Does Not Match
%TAB%
TAB, ATAB, TABLE, TABULAR, MY_TABLE
MY_TAABLE
TA%
TAB, TABLE, TABULAR
ATAB, MY_TABLE, MY_TAABLE
TA_LE
TABLE
TAB , ATAB, TABULAR, MY_TABLE, MY_TAABLE
Use an ESCAPE clause to define the escape character to be used to escape the “%” and “_“ characters in the LIKE statement so that they can be matched explicitly.
You can use ESCAPE '\' in order that a string with 'A%\_' would allow all values starting with 'A' and ending with '_' to be returned.
For example, the pattern %\_TAB% matches the column name MY_TABLE but does not match the column name MYTABLE.

0 COMMENTS

We’d like to hear from you!