Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append for few records
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00598952
Message ID:
00599003
Views:
20
>I would do
append from (m.tcFileName) delimited with tab
from command window and hit escape key.
>
Hi Sergey,

I want to implement it in a program, so the user can decide, do we want to append or we need to adjust table structure. I'm thinking about low-level, but it seems like too much work...

>>I think, you're right. Do you have ideas, how can I limit append for only few records? Do I need to use low-level functions instead?
>>
>>>>>>>>Hi everybody,
>>>>>>>>
>>>>>>>>I can not get to work this simple command:
>>>>>>>>
>>>>>>>>append from (m.tcFileName) delimited with tab ;
>>>>>>>>	       for inlist(state,'MA','CT','RI','NH') and reccount()<100
>>>>>>>>
>>>>>>>>I want to append only few records, then check the file, then if it's correct, append all.
>>>>>>>>
>>>>>>>>Could you please advise, why it doesn't work, as I think, it should?
>>>>>>>>
>>>>>>>>Thanks in advance.
>>>>>>>
>>>>>>>
>>>>>>>Maybe you already have more than 100 recs.
>>>>>>>Cetin
>>>>>>
>>>>>>No, I zapped the table before appending.
>>>>>
>>>>>And there is at least one row with one of those states in file ?
>>>>>Result is 0 recs ?
>>>>>No trigger etc that would deny recs ?
>>>>>Strange.
>>>>>Cetin
>>>>
>>>>Really strange. I'll try again. The file indeed contains CT records (945K of them)
>>>>Still doesn't work.
>>>>
>>>>More info: each time it seems like VFP hangs and I have to kill VFP.
>>>>
>>>>Here is my test command:
>>>>append from (m.tcFileName) delimited with tab ;
>>>> for inlist(state,'MA','CT','RI','NH') and not m.plHalt and reccount()<5
>>>>I'm trying it from command window
>>>>I set plHalt = .f.
>>>>on escape plHalt = .t.
>>>>
>>>>I guess, it would not work for some reason. The text file contains more than 1MM records, could it be a problem?
>>>
>>>I think so. With FOR clause foxpro has to process whole text file regardless how many records meet criteria.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform