Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Concatenating rows in a query, sooo slooow
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00114192
Message ID:
00114304
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform