Subject | Stored Procedure question |
---|---|
Author | Jacob Alberty |
Post date | 2003-12-18T00:18:35Z |
I have two databases, one a database of pets and another a database of
owners
each pet has its own unique petid and each owner has its own unique
ownerid, multiple pets may have the same ownerid (ie owned by the same
owner), i have been trying to figure out how to implement a stored
procedure or udf that is aggregated so that i can take the results of
"select petname from pets where ownerid = :OwnerID", that the results
are as a comma seperated listm ie instead of returning an editable
resultset such as
fluffy
fifi
fubar
i get a list such as
fluffy, fifi, fubar
I have been fiddling with stored procedures but as far as i can tell the
only way to implement this would be in a udf, but i wold just like a
conformation of this fact, and if this is true, can someone point me in
the direction of some documentation that would be usable?
owners
each pet has its own unique petid and each owner has its own unique
ownerid, multiple pets may have the same ownerid (ie owned by the same
owner), i have been trying to figure out how to implement a stored
procedure or udf that is aggregated so that i can take the results of
"select petname from pets where ownerid = :OwnerID", that the results
are as a comma seperated listm ie instead of returning an editable
resultset such as
fluffy
fifi
fubar
i get a list such as
fluffy, fifi, fubar
I have been fiddling with stored procedures but as far as i can tell the
only way to implement this would be in a udf, but i wold just like a
conformation of this fact, and if this is true, can someone point me in
the direction of some documentation that would be usable?