I am running short on time for this project, and most of the the similar issues don't quite match my issue.
I have a montly inventory file with thousands of records. Due to some typo's in diffrent fields, I am not getting the proper distinct listing.
What I want is a distinct NDC number (it_ndc) from the raw data, witht the first "distinct" listing I also want to import the "itemdescr", "it_strn", "it_size", "it_pack". The NDC numbers are unique to a drug, and I can fix the minor typo's once I import the data and create a reference table.
To get a unique NDC record I tried:
SELECT DISTINCT RawMonthly.it_ndc, RawMonthly.itemdescr, RawMonthly.it_strn, RawMonthly.it_size, RawMonthly.it_pack
Due to the typo's in other fields I may get an NDC number more then once (because the whole line is distinct).
SELECT DISTINCT RawMonthly.it_ndc
This gave me the unique NDC numbers, but I had problmes trying to join tables to import the rest of the columns.
I have tried a lot of variations, but I can't get what I need and time is running short.
Basically I need one import to create a reference table, I can set the data types once, and I should be able to move forward after I have the reference table.
Thank you in advance.