SQLStringMatchQ[col,patt]
specifies a condition in an SQL query used to test whether the value of a column matches a pattern. The actual format for the pattern varies from one database to another.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
DatabaseLink`
DatabaseLink`
SQLStringMatchQ
SQLStringMatchQ[col,patt]
specifies a condition in an SQL query used to test whether the value of a column matches a pattern. The actual format for the pattern varies from one database to another.
Details and Options
- To use SQLStringMatchQ, you first need to load DatabaseLink using Needs["DatabaseLink`"].
Examples
Basic Examples (1)
Needs["DatabaseLink`"]If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the DatabaseLink`DatabaseExamples` package, as described in Using the Example Databases.
conn = OpenSQLConnection["publisher"];Select data matching a pattern:
SQLSelect[conn, "ROYSCHED", {"TITLE_ID", "ROYALTY"}, SQLStringMatchQ[SQLColumn["TITLE_ID"], "C%"]]SQLSelect[conn, "ROYSCHED", {"TITLE_ID", "ROYALTY"}, SQLStringMatchQ[SQLColumn["TITLE_ID"], "_S%"]]CloseSQLConnection[conn];See Also
SQLMemberQ SQLSelect SQLInsert SQLUpdate SQLDelete SQLExecute