Thanks Larry. That's a big DUH! For me.
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence
> Lustig
> Sent: Tuesday, February 01, 2005 8:24 PM
> To: RBG7-L Mailing List
> Subject: [RBG7-L] - Re: Formatting Question
>
> > SELECT (LISTOF(DISTINCT company_name)) INTO listnam INDICATOR indvar +
> > FROM v_carrier2pay
> > SET VAR ListNam = ?????
> > --Pick a carrier name
> > CHOOSE valname FROM #LIST .listnam CAPTION 'Pick a Carrier' LINES 20
>
> You don't need the LISTOF, just do:
>
> CHOOSE vCarrierName FROM #VALUES FOR DISTINCT company_name +
> FROM v_carrier2pay LINES 20
>
> This is better because you will not run into the length limit imposed on
> the
> value returned by the LISTOF, and you don't need to worry about the
> quoting.
> You DO need to protect the value you get from the CHOOSE if you are going
> to
> use it as part of an INSERT or UPDATE statement:
>
> SET VAR vCarrierName = (SRPL(.vCarrierName, '''', '''''', 0))
>
> --
> Larry