Steve,
could you use an variable inside a loop. in fox i would say something like
sele cusnum from customer into cursor cust1 group by cusnum
sele cust1
go top
do while not eof()
var1 = " "
another loop through comments file for that customer
do while not eof()
var1 = var1 + comment
enddo
sele newcust_table
seek custnum
if found
repl newcust_table.comment with var1
endif
sele cust1
skip,loop
enddo
Slán
~M
>When doing an insert, how can i merge one field from multiple records in a table but not the other fields?
>
>For example, we are rewriting our application in vb.net using sql server. On the data transfer we have a customer comments table which we need to import. The format for this is
>
>CustNo Comment (varchar30)
>------- -------------------
>1 aaaaaa
>1 bbbbbb
>1 cccccc
>
>and what we need in new app is
>
>CustNo Comment (Text)
>-------- --------------------
>1 aaaaaa bbbbbb cccccc
>
>Any ideas?
>
>Thanks
>Steve
Go raibh maith agat
~M