ronbob Posted December 15, 2005 Posted December 15, 2005 i need to import records from one file (A) to another empty file (:. The file A contains compant records with orders. what i need to do is to have conditional increment whereby the increment occures only if the company number is different. all records for company id ? will have the same record id incremented. i need the increment to be done only if the company id is different on imports. can any help with this? thanks
ronbob Posted December 17, 2005 Author Posted December 17, 2005 in imports the script could be increment on record 1 if company id is equal to previous record copy the increment value from previous record. elseif next record has a different company id then increment by 1. in a loop evaluate all records. can any one help with this? thanks
Wim Decorte Posted December 18, 2005 Posted December 18, 2005 You need to steps in this process: - import all the records you need, just as they are - then loop through the imported found set and apply your logic in a loop script. store the "company ID" and "recordID" in a global, then go to the next record and check their companyID against the global. If they are the same, change the record ID of that record to the one in the global If they are not the same, update the 2 globals to the values of the companyID and recordID of the current record
Recommended Posts
This topic is 6916 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now