This works fine most of the time. However, when I have a case such as the one above where there are multiple NDC values with different status in the zSS_formulary_list table I can only get one status, unfortunately I need to get all of them.
Looping through each record isn't really an option since I am dealing with large amounts of data. Is there a way to devise a SQL query that can do this all in a single query? Any help would be much appreciated. Thank you.
not sure what you actually get and what you need?