> I prefer a code solution
(Code deleted)

Dennis: I had a stored procedure very similar to this on the conference CD
both of the last two years (I think). Basically, it lets you write something
like:

SET VAR vPhoneList = +
  (CALL SelectList("SELECT Phone FROM People WHERE ID ="&.vID))

and puts into vPhoneList a comma separated list of phone numbers.

> Sometimes I wish SQL had this option:
> SELECT [LIST [QUOTED]] colname INTO varname ..........
> Then we would truly have a neat tool to build lists with one SQL command.

I actually put in a request for this a long time ago.  I think the slickest
what to do it would be to add a new aggregate function LISTOF:

SELECT ListOf(Phone) FROM PEOPLE WHERE ID = .vID

or

SELECT ID, ListOf(Phone) FROM PEOPLE GROUP BY ID
--
Larry


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to