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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using wildcards

Status
Not open for further replies.

SeeBee

Technical User
Mar 18, 2002
31
0
0
US
I have a Definition field that I only want certain records for:

WALKUP/12345/LORIANE X1234

The 12345 number will vary, but rest of information will be the same.

Would I use a 'like'? Not sure how I would write it -

{Job History.Ship Via} = "W" and
{Job History.UserDef01} like "WALKUP/?????/LORIANE"


or

{Job History.Ship Via} = "W" and
{Job History.UserDef01} like "WALKUP/?????/LORIANE *"[/color red]

Thanks for your help,
seebee
 
Try:

{Job History.Ship Via} = "W" and
{Job History.UserDef01} like "WALKUP/*/LORIANE*"

-dave
 
Sorry, but I entered as you suggested and returned no results. I know there are records, as I've seen a few.

Selection Expert reads like this:

{Job History.Ship Via} = "W" and
{Job History.UserDef01} like "WALKUP/*/LORAINE *"


If I enter only {Job History.Ship Via} = "W" and
{Job History.UserDef01} like "WALKUP/" [/color red] returns 200 records

seebee
 
Can you post your version of Crystal, data source, and method of connectivity?

After trying the method I suggested, go to Database > Show SQL Query, copy the text, and paste it back here.

-dave
 
Crystal 7.0 Professional

"Show SQL Server" is grayed out.

seebee
 
Try:

{Job History.Ship Via} = "W" and
{Job History.UserDef01} like "WALKUP/" + "*" + "/LORAINE"

Also, note that you have used inconsistent spellings for "Loraine" (or "Loriane").

-LB
 
Maybe there is a problem with the "/" character which is perhaps an escape char. Check your help for this.


--------------------------------------------------
[highlight]Django[/highlight] [thumbsup]
bug exterminator
tips'n tricks addict
 
Let's have a look at
left({Job History.UserDef01},7)= "WALKUP/" and right({Job History.UserDef01},8)="/LORIANE" and len({Job History.UserDef01}=20

--------------------------------------------------
[highlight]Django[/highlight] [thumbsup]
bug exterminator
tips'n tricks addict
 
Oh I saw in your first post something after the LORIANE word, what is it exactly, are there blank spaces, how many, and have you try to enter in the like statement the entire text EXACTLY

--------------------------------------------------
[highlight]Django[/highlight] [thumbsup]
bug exterminator
tips'n tricks addict
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top