SQLitening Support Forum

Support Forums => You've got Questions? We've got Answers! => Topic started by: Marty Francom on February 19, 2012, 10:20:44 PM

Title: Elementary question
Post by: Marty Francom on February 19, 2012, 10:20:44 PM
I have used SQLitening on and off for a couple years.  But not often enough to keep proficient.  I apologize for this rather rudimentary question.  I have SQLite database with a Customer table. The customer table has several fields in it.  One field, CDate. contains the next contact date  in YYYYMMDD format.   

I need to retrieve all the CDate fields from the Customer Table and then programmatically manipulate the date and the write it back to the database.

I currently get one record at a time,  make the necessary changes (programmatically) and write it back to the database one record at a time.  This worked fine while the database was small but the database has grown and the process has become painfully slow.

I know that I should be able to get all the records in one statement to the database then programmatically manipulate the data and then write the data back to the database in one statement.

I have made a couple attempts at writing the statements but I am hopelessly tangled up.

Would anyone have the time to write some sample SQLitening statements that I could use as templates in solving my problem.  Your assistance will be most appreciated. Thanks.   
Title: Re: Elementary question
Post by: Fred Meier on February 20, 2012, 01:19:26 PM
What is the change to the date?  Are all dates changed the same way?  Are you wrapping your current updates inside a transaction(this can make a huge difference in speed)?