On 6/30/2011 6:41 AM, Preston wrote:
> Robert Klemme wrote:
>> On 29.06.2011 17:08, charles wrote:
>>> I need to write a SQL which find all the match recording for a
>>> particular person
>> It seems you do not read replies you get. And why do you open a new
> He's using Google Groups which has been broken for the last few days.
> It's not showing any usenet posts since the 27th. So he won't see
> either his original post, or any replies (including these).
I almost didn't reply to this since it appears to be a homework problem,
but the simplest way to solve it is to use the following PL/SQL function
and compare the concatenated 2nd column values.
CREATE OR REPLACE FUNCTION Concatenate_List (p_cursor IN SYS_REFCURSOR,
delimiter IN VARCHAR2)
/* This function executes the passed query and creates a string of all the
returned values, separated by the passed delimiter.
This is one solution of many to allow one to aggregate multiple values
from a correlated subquery into a string. See here for more info:
EXIT WHEN p_cursor%NOTFOUND;
IF l_return IS NOT NULL THEN
l_return := l_return || delimiter;
l_return := l_return || l_temp;