Ignore Locked Records During Pervasive PSQL Update

2019-08-18 18:21发布

问题:

Is there way to tell Pervasive PSQL to ignore locked records during an standard SQL Update Statement?

I have an update statement that needs to run daily on a Pervasive PSQL 11 SP3 database (that updates thousands of records). This update statement is sent via odbc. After each (of multiple) tries, the update fails after about 5 mintues with:

S1000 General Error

I suspected that maybe some of "the record to be updated" were locked. So I rebooted the server and ran the update statement again. Then, it succeeded.

Is there way to tell Pervasive PSQL to ignore locked records during an standard SQL Update Statement? In my use-case, it is ok if locked records are ignored, but I need to be sure that at least the unlocked records get updated each time this statement runs.

Also, I'd like to accomplish this without a script or stored procedure; I'd like to accomplish this with a SQL update statement. I've used other database where you could append something onto the end of the statement to indicate how locks should be handled, but I can't find how to do this in Pervasive PSQL.