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

Reply via email to