Friday, February 24, 2012

Eliminate duplicates from datasource

Hi All,

I have a SP, which i run inside a for loop.

I am running the SP for all the products in a listbox.

So for each product i am having the feature extracted through the SP

But some features are the same for 2, 3 products.

So in the datatable, i am getting the featrues repeated.

IS there any way to eliminate the duplicates from datatable, from server side?

Hope i am not confusing.

Eg: product1 -- test1, test2, test3

product2 -- test2, test4

so the datatable has -- test1, test2, test3, test2, test4

-- i have to eliminate one test2 from this.

Any ideas?

Thanks

Can you just use a SELECT DISTINCT in your stored procedure or whatever you generate your datatable from?

Jeff

No comments:

Post a Comment