drdave Posted August 19, 2017 Report Share Posted August 19, 2017 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. Quote Link to comment Share on other sites More sharing options...
rberq Posted August 19, 2017 Report Share Posted August 19, 2017 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. Quote Link to comment Share on other sites More sharing options...
Samrae Posted August 21, 2017 Report Share Posted August 21, 2017 This will remove the name that is contained in %T[2]% from variable %[T3]%. Variable Modify String: Replace "%T[2]%" in %T[3]% with "" // Leave the "Replace Text With" box empty 1 Quote Link to comment Share on other sites More sharing options...
rberq Posted August 21, 2017 Report Share Posted August 21, 2017 Yes, Sam. Simpler than my routine and should be just as effective. I still recommend trimming the remaining title. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.