Gary,
I know it's obvious, but is it a requirement to show the ID... could
you just base your choose on the descriptive data and just return
the ID?
Ben Petersen
On 3 Jul 2001, at 10:04, GARY Winzeler wrote:
> I am trying to do a choose and limit the rows returned by from a view. The
> view is a two table view from Plans (pplanid pri key) and Rates (rrateid
> pri key).
>
> each plan has many rates and the rates have tiers which is in the rates table.
>
> CHOOSE vxrrateid FROM #VALUES FOR DISTINCT +
> (LJS(pname,14) & LJS(ptosdesc,45) & LJS(ptype,8) & 'Tier' & CTXT(rtier)), +
> (CTXT(rrateid)) +
> FROM vwplans +
> WHERE rcarid = .vrcarid +
> AT 18,28 +
> TITLE 'Select a Plan (Esc when Done)' +
> CAPTION 'Plans' +
> LINES 19 FORMATTED
>
> as you can see I am trying to return the rrateid which is the primary key
> in the rate table, but with this in the choose it returns all records in
> the view because rrateid is unique. Is there a way to limit the rows
> distinct for each plan and tier then return the rrateid?
>
>
> THANKS
> GARY
>
>