ODBC Pattern Escape Character - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
16.20
Published
August 2020
Language
English (United States)
Last Update
2020-08-25
dita:mapPath
fxv1527114222338.ditamap
dita:ditavalPath
Audience_PDF_product_legacy_odbc_include.ditaval
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities
The ODBC pattern escape character is supported for the following ODBC functions (up to the limitations of Teradata):
  • SQLColumnPrivileges
  • SQLColumns
  • SQLProcedureColumns
  • SQLProcedures
  • SQLTablePrivileges
  • SQLTables

The Teradata LIKE clause does not contain an escape character in the same sense as ODBC; therefore, pattern escape characters for one string must either be in use or not be in use. The following table provides an example of the ODBC Pattern Escape Character:

Valid Syntax Illegal Syntax
“table_all” “tab_e\_all”
“this%table” “this%table\_”
“table\_all\%”  

If a string containing an escaped pattern character also contains an un-escaped pattern character, the string will be converted to all un-escaped characters. For example:

The string “table\_emp%” will be converted to “table_emp%”.