|
Posted by Rich on 01/14/06 08:07
"Pedro Graca" <hexkid@dodgeit.com> wrote in message
news:slrndsgfi4.gck.hexkid@ID-203069.user.individual.net...
<snip>
> If your table has 1000 names you'd do 1001 queries (one for the
> DISTINCT names and 1000 for the classes)
You're right. If there were 1000 names you should loop through the results
of 1 query. But there were only 5.
If there were 1000 names, the structure of the table given would make even
less sense (if that's possible)
>
> Yes, it gets the desired results, but at a *very large* cost!
>
> <snip>
I took a few minutes out of my busy day to give the OP some *ideas* on how
to handle his problem, not do it for him. I never stated that it was
production-quality code. It was a hack to deal with an improperly formatted
table of data.
It took all of 5-10 minutes to cut and paste, was very ugly, and there were
a lot of things wrong with the code but it worked and it showed the results
that *could* be accomplished.
Feel free to optimize, test, debug, and repost, as you (apparently) have
more free time on your hands than I.
Thanks for the critique,
Rich
Navigation:
[Reply to this message]
|