Jump to content
Macro Express Forums

comparing and removing portions of two variables


Recommended Posts

Hi, I'm not sure how to do this.  I have two sets of data.  In Database 1:  I have a person's name (i.e. David Smith) which I assign T72 and a separate Database 2---the same person but with his professional title added (i.e. David Smith RN).   I will assign this name+title as T73 .  Is there a way to "compare" the two variables [T72 and T73] and then "strip" T72 information out of T73 leaving only the individual's title which I can assign to another variable to manipulate it further.

Link to comment
Share on other sites

If the data is consistent -- that is, name portion is exactly the same in both databases -- perhaps you could use the length of the name. 

Variable Modify String: Right Trim %T72%                                 (get rid of trailing blanks in name)
Variable Set Integer %N72% from Length of Variable %T72%   (length of name into variable N72)
Variable Modify String: Delete Part of %T73%                           (starting position 1, length N72)
Variable Modify String: Trim %T73%                                          (get rid of leading and trailing blanks in title)

If the names are not identical between the two databases, it becomes vastly more complicated. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...