Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"LIKE" predicate in a Crystal Sql Command?

Status
Not open for further replies.

starkertowers

Programmer
Mar 30, 2001
10
US
Anyone know if it is possible to use a "LIKE" predicate in a Crystal Reports SQL Command? Simple syntax example would be appreciated. I know it is possible in a formula, but I'm wondering if it is supported in the actual Sql Command builder area.


Mark
 
Yes. Try something like:

(
table."zipcode" like '02453%' or
table."zipcode" like '02140%' or //etc.
)
...where the "%" is used as the wildcard.

-LB
 
Depends on your database and connectivity, wouldn't you think?

LB's syntax should work with most databases, but in general what you are asking is a SQL language question about YOUR dtaabase, so you'll be better served posting specifics (not the generic question as you did here) in a forum for your database.

Your question has nothing to do with Crystal as a Command object just passes what you type to the database (with limited additions based on parameter insertion), so it's your database/connectivity that decides whether a LIKE is supported.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top