Tom:

It sounds like the LISTOF of function would do the trick for you.

Something like this should work:

select (LISTOF(DISTINCT committee)) into vcomserv from cramcommittee where
memberend IS NULL and memberidnum = 100039

You can then reference the list in a command like this:

Select * from cramcommittee where committee in (&vcomserv)

Note the use of the "&" when referencing the value(s) in the vcomserv
variable.

Hope that helps.

Mike Ramsour

-----Original Message-----
From: Thomas Eldred [mailto:[email protected]] 
Sent: Friday, February 05, 2010 10:41 AM
To: [email protected]
Subject: [RBASE-L] - Best Method Question - variables

Hi everyone,

What would be the best technique to return one, none, or many text values
into a single variable that can be separated by hard or carriage returns.
Ideally, I would like to incorporate this variable/value into a view for
display on a report.

I know that: 

"select committee from cramcommittee where memberend IS NULL and memberidnum
= 100039" 

properly returns the values for member 100039

but, 

"select committee  into vcomserv from cramcommittee where memberend IS NULL
and memberidnum = 100039" 

returns the error too many rows selected if the member belongs to more than
one committee.

What I hope to accomplish would is:

Committee 1
Committee 2
Committee 3, etc...

On a report.

Thank you for any guidance on this.

Tom Eldred
Administrative Associate
County Road Association of Michigan



Confidentiality Notice
This message is intended exclusively for the individual or entity to which it 
is 
addressed and may contain privileged, proprietary, or otherwise private 
information.  
If you are not the named addressee, you are not authorized to read, print, 
retain, 
copy or disseminate this message or any part of it.  If you have received this 
message in error, please notify the sender immediately by e-mail and delete all 
copies of the message.


Reply via email to