Is there a special reason you want to do this using javascript instead of ASP? It seems a bit weird to me to let ASP send too many information and then throw out out stuff you don't want with javascript. If you filter the duplicates in ASP you get less data traffic and javascript doesn't have to process anything, making the script faster on two accounts.And yes, I do realize the ASP script will probably get slightly slower, but I'm pretty sure it's worth it

Is there a special reason you want to do this using javascript instead of ASP? It seems a bit weird to me to let ASP send too many information and then throw out out stuff you don't want with javascript. If you filter the duplicates in ASP you get less data traffic and javascript doesn't have to process anything, making the script faster on two accounts.And yes, I do realize the ASP script will probably get slightly slower, but I'm pretty sure it's worth it

Is there a special reason you want to do this using javascript instead of ASP? It seems a bit weird to me to let ASP send too many information and then throw out out stuff you don't want with javascript. If you filter the duplicates in ASP you get less data traffic and javascript doesn't have to process anything, making the script faster on two accounts.And yes, I do realize the ASP script will probably get slightly slower, but I'm pretty sure it's worth it

I see what you mean, it would be even better if this was taken care of in the stored procedure itself.

Now i know this is not an SQL related thread but i will post it anyway, just to show how it would be possible to take care of things like this in the back end rather than client side.