Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo to separate fields
Message
From
05/05/2001 18:30:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00503943
Message ID:
00503946
Views:
19
Try out this portion of code:
________________________________
close tables all
use origen alias origen in 0
use destino alias destino in 0
do while .not.eof()
lineas=memlines(origen.memo)
if lineas > 0 then
lin=1
select destino
append blank
select origen
do while lin<=lineas
actual=mline(origen.memo, lin)
campo=alltrim(substr(actual, 1, at(":", actual)-1))
valor=alltrim(substr(actual, at(":", actual)+1))
select destino
replace &campo. with valor
select origen
lin=lin+1
enddo
endif
skip
enddo
close tables all
________________________________

I assume that you're using to tables:
1º origen, which has the memo field
2º destino, which has the other fields (name, address, etc.)

Basicaly, check out the documentation on two functions: mline() & memlines()

Good luck!
____________________________________________________
Ing. Cesar Bazan
Subdirector de Informática
Registro Público de la Propiedad y el Comercio
Gobierono del D.F.
Previous
Reply
Map
View

Click here to load this message in the networking platform