Re: list of values

From: DanHW <danhw_at_aol.com>
Date: 12 Oct 1999 01:07:14 GMT
Message-ID: <19991011210714.03550.00000165_at_ng-fu1.aol.com>


>I need some info and expertise. I have a table that has several fields
>in it which name different labels for a client. I want a list of values
>which will pull up all those fields into it even though they all belong
>to the same record. I need to be able to hit the list of values key and
>have all the values in all the wanted fields of the same record
>displayed. If they were in different records this would just be
>standard. The record group would look something like:
>
>select label from clients
>where clt_id = :accounts.clt_clt_id
>
>but what I really want to do is
>
>select brk_comm_lbl,spc_comm1_lbl, spc_comm2_lbl from clients
>where clt_id = :accounts.clt_clt_id
>
>with each of these values being a choice in the list of values. How can
>I do this?
>
>

You can do a union in the select statement that builds the record group (you will need to make sure that they are all the same data type)

select brk_comm_lbl
from clients where clt_id = :accounts.clt_clt_id union
select spc_comm1_lb
from clients where clt_id = :accounts.clt_clt_id union
select spc_comm2_lb
from clients where clt_id = :accounts.clt_clt_id

Just as an aside, I would consider making this a view [the union part] and build the record group using the view. Then, if you need to change the LOV, you can change the view on the DB, and not have to modify the form.

Dan Hekimian-Williams Received on Tue Oct 12 1999 - 03:07:14 CEST

Original text of this message