[comp.databases] Recursive Cursors

cim2@pyuxv.UUCP (Robert L. Fair) (10/05/87)

Has anyone come across a need for, or product which supports,
*recursive* cursors in SQL, that is a cursor which has type RECURSIVE
and can have multiple invocations active, using some kind of stack so
that only the last one opened is accessed (This can be used to
solve the classic 'explosion of parts problem') 

I would also like to hear any other suggestions for useful extensions
to SQL, e.g. allow seperate WHERE clauses for each set function (like
QUEL):
	select 	dept, 
		avg(salary where age<25),
		avg(salary where age>50)
	from emp
	group by dept;

or cursors which can go backwards (FETCH PREVIOUS) etc.
		
Bob Fair
Bellcore/CHC
ihnp4!pyuxww!pyuxv!cim2 (until November 1)

mlache@beryl.berkeley.edu (10/18/87)

no, i haven't heard about a product which supports cursors
of type RECURSIVE, but if you're looking for a product that
can solve the "parts explosion" problem in one SQL stmt,
you might investigate Oracle's CONNECT BY syntax.