Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting from Selects or Cursors
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Selecting from Selects or Cursors
Miscellaneous
Thread ID:
00652491
Message ID:
00652491
Views:
45
I know this question has been ask before but I can't find the answer in the PUTM Search. Hope you can help...

What is the equivilent in SQL Server for the following:

Select *
from Customer
where state='CA'
into cursor csrCustomer

Select fname, lname
from csrCustomer
where fname like 'Mich%'
and lname like 'Levy%'
Group by fname, lname

/* Hint-Hint */

I know this is a lame example (unless you're Micheal Levy then it's a cool example) but it's what's being attempted in a more complicated form - so nested selects won't do the job for me.

I tried playing with SQL Server Cursors but apperantely you can only fetch one record at a time - that blows!

Any help is appreciated - TIA
Next
Reply
Map
View

Click here to load this message in the networking platform