Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Find similarities between two fields Post Reply Post New Topic
Author Message
stevdes
Newbie
Newbie


Joined: 14 Oct 2009
Location: Canada
Online Status: Offline
Posts: 1
Quote stevdes Replybullet Topic: Find similarities between two fields
     Posted: 14 Oct 2009 at 8:51am
Is there a formula or something to find similarities between 2 fields.
 
Example: I know in field A and B there is the below information in them.
 
Field A   
AB
 
Field B
3.2 AB
 
I linked the two fields above the results I'm getting at the moment is:
 
Field A          Field B
AB            
 
I tried using the "like" formula:    If Field A like "*Field B*" then Field B else "", but the result is blank.
 
What I would like is, if there is a similarity between fields A / B it will display field B.
 
I hope this explanation is clear.
 
Thanks in advance.
 
Steve.


Edited by stevdes - 14 Oct 2009 at 8:52am
IP IP Logged
AntDC
Groupie
Groupie
Avatar

Joined: 23 Dec 2008
Online Status: Offline
Posts: 76
Quote AntDC Replybullet Posted: 14 Oct 2009 at 9:14am
Well - really you need to know what level of similarity you are looking for.

Maybe InsStr may help...
But you have to check both as in your example A  would be in B but B would not be in A  :)

HTH

Regards

DC
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Oct 2009 at 7:00am
Instr is not a sql command.  As I think about it, I don't think that you can join on the 2 fields. 
 
You can filter the data, and there you can use the instr command....
instr({tableb.fieldb},{tablea.fielda})>0
 
HTH
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