Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There are 5 columns in my excel sheet which are like

>> Medicine Name
>> Medicine Category
>> Manufacturer Name
>> Generic Name
>> H_drug_flag

So I Need a query to retrive rows from excel all medicines Details such that Combination of Medicine name and medicine category should be unique.

EX: Medicine Name Medicine Category Manufacturer Name Generic Name H_drug_flag

1. dolo tablet dr.reddys gen1 0

2. a b phylin tablet safe pharma gen2 1

3. dolo tablet safe pharma gen1 0

4. dolo syrup safe pharma gen2 0

5. dolo tablet dr.reddys gen1 0



assume above rows are there in my excel sheet.

i need output like :

1. dolo tablet dr.reddys gen1 0

2. a b phylin tablet safe pharma gen2 1

4. dolo syrup safe pharma gen2 0


i wanted to skip 3 ,5 rows because 3 rd row is duplicate row for 1st row,
and 5 because combination of medicine name and medicine category is same as 1 st row .


please can any one provide me answer....
Posted
Updated 20-Jan-14 17:52pm
v2
Comments
Karthik_Mahalingam 21-Jan-14 0:06am    
you can read the excel and fill into a datatable and then you can apply filter to do the distinct ....
Saikumar Guptha 21-Jan-14 2:15am    
can u pls elaborate @ karthik
Karthik_Mahalingam 21-Jan-14 3:29am    
what you have tried ?
Saikumar Guptha 21-Jan-14 5:23am    
thanks for the reply i worked out as u said i got my output.@karthik
Karthik_Mahalingam 21-Jan-14 5:28am    
:) Good to hear..
keep it up :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900