Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Merge many rows into one row
Message
 
To
11/10/2006 06:58:58
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01161133
Message ID:
01161138
Views:
15
Hi Tariq
SELECT FDATE,GetList(FDATE) AS PARTY;
FROM WEIGHTS;
WHERE FDATE=THIS.VALUE ;
ORDER BY PCODE;
GROUP BY PCODE;
INTO cursor fix


FUNCTION GetList(ldFDATE)
LOCAL lii,lcc
LOCAL ARRAY laPom(1)
SELECT GNO;
FROM WEIGHTS;
WHERE FDATE=ldFDATE ;
ORDER BY PCODE;
GROUP BY PCODE;
INTO ARRAY laPom

lcc=""
FOR lii=1 TO ALEN(laPom,1)
    lcc=lcc+laPom(lii)+","
NEXT


RETURN IIF(LEN(lcc)=0,SPACE(254),LEFT(lcc,LEN(lcc)-1))
MartinJ


>Dear Experts
>
>SELECT FDATE,GNO AS PARTY;
>FROM WEIGHTS;
>WHERE FDATE=THIS.VALUE ;
>ORDER BY PCODE;
>GROUP BY PCODE;
>INTO cursor fix
>
>
>The select statement generate folloiwng SQL Results
>
>25-09-2006------2
>25-09-2006------5
>25-09-2006------6
>25-09-2006------8
>25-09-2006------7
>
>But I want to get following result
>
>25-09-2006------2,5,6,7,8
>
>Please help
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform