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!

Search for "*", not wildcard 1

Status
Not open for further replies.

bobbyr

Programmer
Nov 30, 2000
66
US
I am trying to use Select Expert to select data that starts with * (an astrisk), but the Select Expert is selecting everything thinking that I'm specifying a wildcard. Any way around this?

Thanks,
Bobby
 
[ol][li]If you can (depending on your database, driver and CR version), create a SQL Expression that substrings the first character of your data field[/li]

[li]Format your record selection statement like this:

{%SQLExpression} = '*'[/li][/ol]If you aren't concerned about performance at all, then you can simply use the following select statement:

Left({table.fieldname},1) = '*'
 
Try:

{Customer.Customer Name} [1 TO 1] = "*"

That will pass the SQL and only return those with an asterisk in the first position.

Crystal is VERY persinickety about pass through SQL... The select expert does an OK job, but you have to experiment sometimes with creating a manual record selection criteria.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top