Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: excluding TEST Post Reply Post New Topic
Author Message
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Topic: excluding TEST
     Posted: 14 Mar 2012 at 1:42am
Hi all,

I'm working on a report showing the collections per client. Unfortunately, there are also a couple of test clients entered in the database. These are also used to test in a live enviroment (anoying, but I'll have to live with it).

Now I need a formula, excluding every client that has TEST in their name. Can anybody help me write this formula?

Thanks in advance

Gerben
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Mar 2012 at 4:57am
I would be careful with this. If you can alter the content of hte test names to also include some character that would never be used in a valid name it would help
like 'TEST#'.
If you cannot do that I would try to write it to follow only the structure for the test client names if there is one.
The reason you need to be careful on this is you may inadvertently remove other clients.
 
You can use the  LIKE with *
table.name like '*TEST*'
 this will find anything with TEST anywhere in the string
table.name like 'TEST*'
 this will find anything with TEST at the start of the string
or use LIKE with ?
table.name like 'TEST ?'
this will find anything with TEST a space and any one character
or use a combination of the * and ? together
 
or instr() is naother option
 


Edited by DBlank - 14 Mar 2012 at 4:58am
IP IP Logged
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