removed and no change - so appears that you can NOT use the retcol if you want to use distinct - IS THIS TRUE???

At 07:29 AM 7/4/01 -0400, you wrote:
I think your problem is with the retcol.  Don't CTXT() it - it will be returned as text in any event.  As a habit, I use two vars to pick up integer identifiers.

SET VAR vChoice TEXT
SET VAR vxrrateid INTEGER

CHOOSE vChoice FROM #VALUES FOR DISTINCT +
  (LJS(pname,14) & LJS(ptosdesc,45) & LJS(ptype,8) & 'Tier' &
      CTXT(rtier)),rrateid +
  FROM vwplans +
  WHERE rcarid = .vrcarid +
   AT 18,28 +
  TITLE 'Select a Plan (Esc when Done)' +
  CAPTION 'Plans' +
  LINES 19 FORMATTED

SET VAR vxrrateid = (INT(.vChoice))


[EMAIL PROTECTED] wrote:
>
> Sorry Gary, my mistake... in my haste I thought I saw rrateid there
> twice <blush>.
>
> What you might try is building a column in your view that does the 
> concatenation and formatting that you want and do the choose
> from there. Also; I don't think it will make any difference, but you
> don't need to ctxt the return var as choose always returns text
>
> > but when you have the id in the return location it
> > appears to use it in the distinct as well.  (??)
>
> I've never noticed this, but may not have stumbled over it yet either.
>
> Ben Petersen
>
>
> On 3 Jul 2001, at 10:48, Gary L. Winzeler wrote:
>
> > Yes, that is what I'm doing - just showing the descriptive data and trying
> > to return the id, but when you have the id in the return location it
> > appears to use it in the distinct as well.  (??)
> >
> > Am I doing something wrong here??
> >
> > GARY
> >
> > At 10:31 AM 7/3/01 +0100, you wrote:
> > >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
> > > >
> > > >
> >
> > Regards,
> >
> > Gary L. Winzeler
> >
> > DAQtech, Inc.
> > Data  Acquisition Technology
> > <mailto:[EMAIL PROTECTED]>
> > <http://www.daqtech.com/>
> >
> > Office  408-847-4800
> > Fax             408-847-4097
> > Cellular        408-483-7739
> >
> >
>
>
>
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

Regards,

Gary L. Winzeler

DAQtech, Inc.
Data  Acquisition Technology
<mailto:[EMAIL PROTECTED]>
<http://www.daqtech.com/>

Office  408-847-4800
Fax             408-847-4097
Cellular        408-483-7739

Reply via email to