• Welcome, Guest. Please login.
 
August 04, 2020, 12:02:16 am

News:

Welcome to the SQLitening support forums!


Elementary question

Started by Marty Francom, February 19, 2012, 10:20:44 pm

Previous topic - Next topic

Marty Francom

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.   

Fred Meier

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)?