Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to fill field2
Message
 
To
22/10/2004 15:51:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00953812
Message ID:
00953864
Views:
13
OK, I assume that:
- for particular field1 value there could be only ONE value for field2
- if empty field2 is found then replace it with appropriate value
sele field1, field2 DIST  from yourtable where not empty(field2) into curs temp
index on field1 tag _1
sele yourtable
set rela to field1 into temp
repl field2 with temp.field2 for empty(field2)
>Yes, just to fill second record with first one aaaaa or 3rd one aaaaaa because field1 has the same value 111111 so field2 must fill with the same
>value too, but how to do this , please assist me in coding
>TIA
>
>
>
>
>"Non empty field2"? There could be many populated field2 having different values. What value to take?
>"second blank field "? Do you mean that there could be other blank fields, and you do not wish to populate them?
>Or do you mean that if there are three records found where the second record is empty, and the first and the third records contain the very same value, then populate the second record?
>
>>Hello,
>>
>>How to fill a second blank field with non empty field2 in mytable.dbf
>>
>>mytable.dbf
>>
>>field1 field2
>>
>>111111 aaaaaa
>>111111
>>111111 aaaaaa
>>
>>222222 bbbbbb
>>222222
>>222222 bbbbbb
>>
>>to have mytable.dbf as
>>field1 field2
>>
>>111111 aaaaaa
>>111111 aaaaaa
>>111111 aaaaaa
>>
>>222222 bbbbbb
>>222222 bbbbbb
>>222222 bbbbbb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform