Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: How do you use NOT LIKE with multiple not likes? Post Reply Post New Topic
Author Message
icheckout
Newbie
Newbie


Joined: 18 Apr 2010
Location: United States
Online Status: Offline
Posts: 15
Quote icheckout Replybullet Topic: How do you use NOT LIKE with multiple not likes?
    Posted: 20 May 2010 at 10:31am

Thank you for looking at my post.

I am creating a report that excludes certain domain names. I have several domains now and will be adding additional excluded domain names in the future.
 
I can get the select statement to work by entering a line for each domain name.  Here is what I use now (works correctly):
 
NOT ({DomainAddress} LIKE "DELL*") AND
NOT ({DomainAddress} LIKE "YAHOO*") AND
NOT ({DomainAddress} LIKE "APPLE*")
 
But it seams that you should be able to use something like (this example does not work):
 
NOT ({DomainAddress} LIKE "DELL*","YAHOO*","APPLE*"
 
Here is my question:
 
Can someone give me the correct syntax for a formula with multiple "not like" fields so I do not need to enter the line over and over?
 
Thank you,
Richard Scott

 

IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 22 May 2010 at 8:43pm
Can you try :
 
NOT (LEFT({DomainAddress},4) in ["DELL","YAHO","APPL"])
 
 
 
hope it help.
 
Emir W
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 May 2010 at 5:09am
If you want to continue to use the LIKE option I think this should also work:
 
NOT ({DomainAddress} LIKE ["DELL*","YAHOO*","APPLE*"])
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.