0
votes

I'm a little confused with Crystal Reports [LIKE] pattern operator, compared to SQL's [IN] operator.

I have inherited maintenance of an old report that uses FORMULA FIELDS to qualify the data used in SELECTION FORMULAS > RECORD SELECTION.

One of the FORMULA FIELDS uses [LIKE] to limit the records returned.

EXAMPLE IN CRYSTAL:

IF {table.column} LIKE ["A","B","C"]

COMPARED TO SQL:

SELECT * FROM table WHERE col1 IN ("A","B","C")

I can't find documentation that uses LIKE in this way. Since I can't find supporting documentation for LIKE I question if this is the "best practice" for filtering content. Is there a better way?

Thanks,

-Allen

1

1 Answers

0
votes

It is the correct way to use in crystal.... it will pick the values that satisfies the like operator... also you mentioned it in record selection formula so it will be directly included in where clause of the query generated in crystal

Edit----------------------------------------------------------------------------------------------

Use below link to know the documentation of the crystal reports.

Link

I have pasted for Like operator but if you want to see documentation for formulas or build different formulas you can use above link.