Product: | DBConnectivity ODBC Products |
Version: | All |
ID: | 1110 |
Summary: | Using wildcards with SQLTables to limit user views when linking/importing into Excel or Access |
Wildcards can be used when linking or importing into Microsoft Excel or Access, although it may not be possible to use the approach below in all ODBC-enabled applications. For example, assume views end in either "_VW" or "_VIEW" and the goal is to use wildcards to limit the views to just those that contain the characters "_V".
To browse just the tables (or views) ending in "_V", you can call SQLTables, providing a string such as "%_V" as your TableName parameter.
Some arguments in the catalog functions, such as the TableName argument in SQLTables, accept search patterns.
The search pattern characters are:
- An underscore (_), which represents any single character.
- A percent sign (%), which represents any sequence of zero or more characters.
- An escape character, which is driver-specific and is used to include underscores, percent signs, and the escape character as literals.
Examples
Pattern Description
%A% All identifiers containing the letter A
ABC_ All four character identifiers starting with ABC
ABC\_ The identifier ABC_, assuming the escape character is a backslash (\)
\\% All identifiers starting with backslash (\), assuming the escape char. is backslash
Alternative Approach:
Create an "Alternate Qualifier" in the data source configuration.