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

NOT LIKE Syntax

Status
Not open for further replies.

jfokas

Programmer
Apr 28, 2002
42
0
0
I am having a problem adding one phrase to an existing formula, but I can't seem to get the syntax right. The solution is bound to be obvious that it's jut not coming to me. Please help!

The exist formula is this:

IF {stpc_slide_labels.accession_no} LIKE 'EL*'THEN{stpc_slide_labels.last_name}
ELSE{@full_name}

I'm trying to add a clause as such:

IF {stpc_slide_labels.accession_no} LIKE 'EL*' AND {stpc_slide_labels.procedure_code} NOT LIKE 'SS*' THEN{stpc_slide_labels.last_name}
ELSE{@full_name}

Crystal does not like my "NOT LIKE" statement and I can't seem to get the right syntax. This feels like an extremely silly and simple question but I'm stumped. Thanks in advance for your help!

John

 
Crystal likes the NOTs in paerens:

Your formula would be:

IF {stpc_slide_labels.accession_no} LIKE 'EL*' AND NOT({stpc_slide_labels.procedure_code} LIKE 'SS*') THEN{stpc_slide_labels.last_name}
ELSE{@full_name}




Mike
 
Thanks, I knew I was missing the obvious!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top