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

excluding numbers that start with.....

Status
Not open for further replies.

jschill2628

Programmer
Nov 3, 2009
156
US
I am using Crystal Xi.

Is there a way to select anything that starts with something. For example I want to exclude out of my data anything that start with the following numbers
09 71526
10 74327
11 75201.

As you can see from below I have several instances where this occurs, and to get the correct data, I want to exclude these numbers. The problem comes from where ther can be most then just this handful, it can grow exponentially, so that why I want to exclude numbers that start with 09 71526, 10 74327, and 11 75201.

09 71526-594
09 71526-595
09 71526-596
09 71526-597
09 71526-598
09 71526-599
09 71526-600
09 71526-601
09 71526-602
09 71526-603
09 71526-604
09 71526-605
09 71526-606
09 71526-607
10 74327-25
10 74327-26
10 74327-27
10 74404-18
10 74406-27
10 74406-28
10 74406-29
10 74456-6
10 74463-27
10 74463-28
10 74928-3
10 74928-4
11 75201-2


THANK YOU!!
 
In select expert

not(startswith({yourfieldname}, "09 71526")
and
not(startswith({yourfieldname}, "10 74327")
and
not(startswith({yourfieldname}, "11 75201")

YOu might also ne able to use

not({yourfieldname} like ["09 71526*", "10 74327, "11 75201*"])

But I have never tried that

Ian
 
I'd do it by creating a formula field that is a boolian:
[Code @Excludable]Left({your.field}, 8) in ["09 71526", "10 74327", "11 75201"][/code]
Put this beside the unselected data and check that it works, True or False, space would indicate nulls.
Then add to the selection as
Code:
not @Excludable


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
1) Select expert
2) Select new
3) Select the cloumn which contains those numbers(09 71526.. etc,)
4) Click the dropdown button, select the "not equal to"
5) Add those excluding numbers and click ok.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top