Thanks everyone, I'll have a look at Barbara's idea of seeking and scanning. The category can be repeated so I'll build in something for that. I'll also try adding an index for deleted() (Jim). - Sarah
>Sarah,
>Assuming you have an index on the EntryID+Category, you can skip the SELECT entirely:
>
>lclist = ''
>SELE EntryDet
>seek TCID
>scan while entryid = TCID
> lclist = ', '+lclist + category
>endscan
>
>** Remove the initial ', '
>** Pad to 30 char
>if len(lclist) > 0
> lclist = padr(substr(lclist,3), 30)
>endif
>
>hth
>Barbara
>
>
>>There has got to be a better way -- I have a View which calls the program below. The idea is that the categories in the child record s are put into a single string in my (read only) view. It is very slow and I don't have many records yet. ...snip ...
Sarah King
pcpropertymanager.com