PDA

Click to See Complete Forum and Search --> : Crystal 9 selecting "123" all fields


ijanes
Apr 1st, 2004, 01:01 PM
Help Please,
Failed code in the Selection Formula (Record Selection) of Crystal Report V9:


Select ALL FROM tblPatients ALL Like "stomatitis"

I am a beginner and need more help than the on-line help provides.

Objective:
To select the word "stomatitis" from any of the 129 fields of the table tblPatients. The problem is this word could appear in any field.

Any help would be greatly appreciated and I could pay a reasonable amount of money for your time and knowledge.
Irene

Pasvorto
Apr 2nd, 2004, 07:28 AM
I'm no expert, but I think you may be stuck with this is the record select function:

{fieldA} = "text" or {fieldB} = "text"... adnauseum

RobDog888
Apr 4th, 2004, 06:20 PM
From Crystal 8.5 help file...

Like pattern operator
Basic and Crystal syntax.

The Like operator is useful for selecting records to include or exclude from your report.

Usage
x like y


{fieldname} like "c?n*"


This operator tests to see if the contents of {fieldname} matches
a pattern that you specify in a character string "c?n*". If the
contents of the field do fit the pattern "c?n*", then the formula
returns the value True. If the field starts with anything else, the
formula returns False.

Use the wildcard symbols ? and * to stand for variable
characters. The ? stands for a single character. The * symbol
stands for any number of characters.


Examples
The following examples are applicable to both Basic and Crystal syntax:

{customer.FIRST NAME} like "D?n"

TRUE, where {customer.FIRST NAME} = Dan or Don.

{customer.FIRST NAME} like "D?n"

FALSE, where {customer.FIRST NAME} = Doug or Rob.

{customer.LAST NAME} like "*s?n*"

TRUE, where {customer.LAST NAME} = Johnson or Olson or Olsen.

{customer.LAST NAME} like "*s?n*"

FALSE, where {customer.LAST NAME} = Johnston or Smith.

:)

HTH

ijanes
Apr 5th, 2004, 02:18 PM
Thanks for the replies but please allow me to claify what it is I am trying to do.

I have one table of 129 fields
I wish to search all 129 fields
for a pattern

I keep trying the following syntax without any luck.

Select * from tblPatients where *="stomatitis"


I am saying select all fields
from the table tblPatients
where stomatitis

RobDog888
Apr 5th, 2004, 02:43 PM
From the above examples I posted you can see that you need to
list the field names in the Where clause. The wild card character
will not work for the field names in the Where clause. So, you will
need to list all 129 fields in your Where clause, but I dont know
what the limit is for the length of the query in Crystal.

:(

ijanes
Apr 5th, 2004, 03:02 PM
Thanks for the information. Yes, I did find out that the limit was 1,000 or 2,048 chrc . I can't remember extactly what the error message said.