Troubleshooting
Problem
What is the syntax to use a wildcard with a LIKE operator in a SQL SELECT statement in IBM Rational(R) Robot (SQA Basic Language)?
Resolving The Problem
What is the syntax to use a wildcard with a LIKE operator in a SQL SELECT statement? The SQL SELECT statement can then be used in the Query argument in the SQLRequest command in SQABasic?
The '%' is the wildcard used with LIKE.
An example of a query using this is:
SELECT userID FROM term WHERE userID LIKE '17%'
This command will return all userID's in the table term that start with 17:
UserID:
17
170
17001
etc...
LIKE is a powerful character string comparison operator that allows for the selection of only rows that are "like" what is specified. The percent sign "%" can be used as a wild card to match any possible character that might appear before or after the characters specified.
Historical Number
116815627
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21136450