Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving data instead of delete
Message
From
22/05/2008 13:23:37
 
 
To
22/05/2008 12:17:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01318588
Message ID:
01319059
Views:
30
>Everything depends upon context and your report's requirements. But, unless your report will require some information that isn't currently in the table, I see no need to add any new fields to the history table. Doing so would actually make it much harder to join the tables into one report cursor.
>
>
>>Wow thanks then just 1 more stupid question this (will be existing) history.dbf will I have to design this with all the same fields etc... or do their NEED to be any additional fields???
>>
>>Thanks A Lot
>>
>>Fred W.
>
>
>
>>>If the table is never packed you can SET DELETED OFF before you run the report and SET DELETED ON afterwards.
>>>
>>>If the table gets packed you need to copy the deleted record to a history table
>>>
>>>scatter name oRecord MEMO FIELDS EXCEPT lot,location,location2
>>>insert into veg from name oRecord
>>>
>>>scatter name oRecord MEMO
>>>insert into history from name oRecord
>>>
>>>
>>>Bear in mind that when you eventually run the report you will have to select data from both the main and history tables
>>>SELECT * FROM maintable;
>>>   UNION ALL;
>>>SELECT * FROM history;
>>>ORDER BY ??????;
>>>INTO CURSOR curReportData
>>>
>>>I think the ORDER BY clause refers to the entire result set rather than just the second select. Somebody can correct me if I'm wrong.
>>>
>>>>I have this routine for moving data through this inventory program and it works great, however the customer would like to see 1 set or (Module) worth of reports that will work off cumulative numbers and print out averages of data therein. The problem with this is how the program was designed for data transfer.
>>>>
>>>>What I am trying to accomplish is this that the data still moves on to the next stage but that the data is also stored elsewhere for later reports or ??? below is the code for moving the data, maybe it can be stored in a view or ??? I have not done this before.
>>>>
>>>>Here's the code I am now working with
>>>>
>>>>
>>>>scatter name oRecord MEMO FIELDS EXCEPT lot,location,location2
>>>>insert into veg from name oRecord
>>>>delete
>>>>
>>>>
>>>>Anyone have any ideas???
>>>>
>>>>Thanks,
>>>>
>>>>Fred W.
Rich,

Thanks again I appreciate it.

Fred W.
Previous
Reply
Map
View

Click here to load this message in the networking platform