Al,
>>Most certainly if you have a huge table or slow network based file and only want a few records it's much more time efficient to do
something like:
>I don't see how you're handling the case where you might select the same record more than once. Unless you're DELETEing it in TheSampledTable. Otherwise, checking to see if you've already selected a given record can be expensive.
You are right, I didn't. That code fragment wasn't meant to be a total solution, that's why I said "something like". I'd probably do a check for the existence of the PK in the sample and skip the insert if it was already there.