01-11-2016 07:31 AM
Probably "DRUG 2" is one of the formatted values of drug_id.
In that case:
if put(drug)id, $tdrug41.) = 'DRUG 2";
Otherwise please attach a small piece of the data and code.
Hope this helps,
01-11-2016 07:46 AM
Maybe you can add a few lines of data and also a few lines of the format definition. It may be something like variable length of uppercase/lowercase. Dirty work...
01-11-2016 08:28 AM
Just want to add two points to this. Firstly, if @EH solution worked, its good form to mark his post as the result, both so other people can see the solution and so he gets some points for the effort. Secondly, why are you attempting to find a drug name via formats? If you need to use drug information you are far better off using coded data using WHO Drug coding. I would be suprised if you didn't have this autoencoding on the database. It allows you to find specific drugs/drug groups regardless of typos in the data, different product names etc. your example for instance could be Biphasic Insulin Aspart, your code wouldn't pick it up. Also, you then need to separately maintain your formats catalog, i.e. re-inventing the wheel.
Need further help from the community? Please ask a new question.