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

"Start with "query help

Status
Not open for further replies.

JasonMcConnell

Technical User
Mar 10, 2005
29
GB
Hi,

I am trying to create a query in crystal that will return a list of all records that does not have a bracket at the start of the field.

The following query returns all records that do have a bracket at the starts

{REGISTRATION.NARRATIVE} STARTSWITH '{'

But can anybody tell me how to make crystal XI return records that do not start with a bracket?

Basically the opposite of above

I have tried {REGISTRATION.NARRATIVE} NOT STARTSWITH '{' but the syntax is wrong.

Thanks for your help
 
Hi,
Try

NOT ( {REGISTRATION.NARRATIVE} STARTSWITH '{' )

In CR, you need to negate the entire formula not the 'startswith' part.


From the Help file:
Not operator
Basic and Crystal syntax.

Usage
not (x)

Reverses the True or False value of x.

Value of x Not x
True
False

False
True



Not (Not(False)) = False
Not (Not(True)) = True
Examples
The following examples are applicable to both Basic and Crystal syntax:

not (A>B and B>C)

If A=5, B = 4, C = 3, the expression (A>B and B>C) is TRUE. Both conditions tied together by the Boolean operator And are TRUE; thus, the entire statement has a value of TRUE. The Not operator changes the value of the expression to FALSE.

not (A>B and B>C)

If A=3, B = 4, C = 3, the expression (A>B and B>C) is FALSE. One of the two conditions tied together by the Boolean operator And is FALSE; thus, the entire statement has a value of FALSE. The Not operator changes the value of the expression to TRUE.

not ({file.ONHAND} - {file.ORDER} > 0)

Returns TRUE if {file.ONHAND} = 10 and {file.ORDER} = 11.

not ({file.ONHAND} - {file.ORDER} > 0)

Returns FALSE if {file.ONHAND} = 10 and {file.ORDER} = 9.




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top