Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PLS! - Need example to UPDATE Table in DB from external txt file

Status
Not open for further replies.

rsd2524

Technical User
Aug 11, 2011
1
US
Hello,
I need to UPDATE tables in a Pervasive v10 DB with data that has been exported to an external file (.csv, .xls, etc.). At the moment I'd like to leave data in the target table intact, updating the records/fields, or adding new records if they do not exist.

I understand that it may be simpler to import the data, deleting all existing data, and if that is the best course of action, then that is the path I will take, but the existing data has been partially updated, and the users do not want to start the update/verification process again. There is the possiblity that the current data in the target can be exported, and combined with the source data outside of DB and then massaged for reimport to the target.

I am relatively new to hands-on SQL syntax, but have a good understanding of the general nuts and bolts. Essentially, I am asking for someone to tell me how to do it, and provide a sample command structure, because due to pressure and time constraints I don't have time to figure it out and test it for myself, and I have been unable to locate a suitable/adaptable sample on the web. BTW - I am not opposed to running a single command mutliple times changing source/target parameters as long as it gets the job done accurately and faster than manual.

Thank you in advance for any help or experienced perspective on this task,
Jeff

 
Unfortunately, none of the tools included in PSQL support Updating records.
You might take a look at the Pervasive Data Integration tools. They might be able to do what you are looking for. The other option is to write (or have written) a specific tool for your needs that reads the CSV, creates an Update statement from the CSV data and executes the statement.


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top