Thanks. I guessed so but I wanted the opinion of the Gurus.
>>Hi all
>>
>>This is a typicaly requirement that I have. I have a table having values as below:
>>
>>HB Haematology
>>TC Haematology
>>URM UrineAnalysis
>>DC Haematology
>>
>>
>>I can group the above like follows:
>>
SELECT * FROM ... GROUP BY 2
>>
>>but I want the following result in the result:
>>
>>HB TC DC Haematology
>>URM UrineAnalysis
>>
>>
>>Is this possible to display in a view. This view will then be used externally by Report Manager for printing purposes. Thus I have to already have formatted the data beforehand as Report Manager won't be able to call VFP UDFs.
>>
>>Please help.
>
>I don't think you can do this w/o UDF's.
>SELECT Test0.ln, combinesn(ln) AS snlist;
> FROM ;
> test0;
> GROUP BY Test0.ln
>
>...
>FUNCTION combinesn
>LPARAMETERS lcLn
>LOCAL laList[1], lcStr, i
>SELECT sn FROM test0 ;
> WHERE ln = lcLn ;
> INTO ARRAY laList
>
>lcStr = ""
>FOR i=1 TO _TALLY
> lcStr = lcStr + " " + laList[i]
>ENDFOR
>RETURN PADR(lcStr,32)
>