Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement