WHERE clause must contain
character values; otherwise, the
LIKE operator cannot be used.
LIKE operator compares the value in the specified column
with the pattern, as inserted in single quotes following
LIKE. A row
is retrieved if a match occurs.
place of a fixed length string, although you would need to escape a
' with another
' by typing
'', if you
want the character
' to be part of the query.
LIKE will be
interpreted exactly as Metamorph would interpret such a query on its
query line, in any Metamorph application (with the only exception
being that a single quote or apostrophe must be escaped with
' to be interpreted literally).
LIKE, but can be selectively invoked on a word using the
LIKE can make use of any indexing which has been
done. An alternate form of
LIKE may also be used called
uses indexing exclusively with no post search. See
Chapter here for a thorough explanation of all types of
text searches possible with
LIKE3, and their relation to
Example: Let's start with a simple example. You wish to retrieve all reports where "ink" is part of the title, without knowing the full title.
If you enter the statement:
WHERE TITLE LIKE 'ink' ;
the result displayed will be:
TITLE Innovations in Disappearing Ink Disappearing Ink Promotional Campaign Ink Color Panorama
In this query, you are retrieving the titles of all reports whose title is "like" the pattern "ink".
In other cases you may not know the exact words you are looking for.
A simple example where a wildcard '
*' is used follows.
SELECT AUTHOR, DEPT
WHERE AUTHOR LIKE 'san*' ;
The result will be:
AUTHOR DEPT Sanchez, Carla MKT Sanders, George G. FIN Claus, Santa MKT