Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting from Selects or Cursors
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00652491
Message ID:
00652544
Views:
17
>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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform