>Or you can use temp table
>Select * INTO #csrCustomer
> from Customer where state='CA'
>Select fname, lname
> from tempdb..#csrCustomer
> where fname like 'Mich%'
> and lname like 'Levy%'
> Group by fname, lname
>
>Sorry, my fat fingers hit the send instead of the preview - another question - When does the temp table get destroyed? Or should I not concern myself with it?
The temporay table created in SP is destroyed when SP finishes. Otherwise temp tables is deleted at the end of the session. If you're not closing connection than you've to explicitly DROP temp table before creating it again.
--sb--