Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Concatenating memos
Message
De
02/02/2001 17:56:17
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00472040
Message ID:
00472045
Vues:
34
>I don't think what I want to do is possible, but I thought I'd take a shot in case I'm missing something. :)
>
>I have a table something like this:
>
>dDate, cFname, mCmnt
>
>There can be more than one record with the same date and fname. These will have different comments. I'd like to shove all the comments into one memo field for each date/fname combo. I know I could so it with regular xbase commands, but I'm wondering if there's a way with SQL. Something like:
>
>SELECT dDate, cFname, SMOOSH(mCmnt) AS mBigCmt ;
>FROM myTable ;
>GROUP BY dDate, cFname
>
>Obviously, "SMOOSH" isn't a real command. :) Is there a command I can put there that will do this? I didn't see one in the help file, and I've never heard of such a thing...
>
>I s'pose I could do it as a UDF...


even if you could do it with a UDF and use it in a SELECT - SQL statement it would not be Rushmore optimizable; this defeats the purpose of using a SELECT - SQL statement. Thus, a series of XBase command would be just as fast as (SELECT-SQL + UDF)






I'm blanking on how it would be done, though. Any suggestions? With SQL, that is. I know how it could be done with a SCAN loop.
>
>Thanks,
>
>Michelle
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform