Thank you all. I rewrote the code in lowercase, not abbreviating and removing the "FIRST" in "FIND" statement. All these tips helps me a lot. I'll do some tests, but as always, this was really helpful.
Sorry for the delay in the response. I was doing some tests and research. That trigger needs refactoring indeed. Besides that, here's what I come up with based on the STOP-AFTER code snippet suggested.
define variable allDone as logical initial false no-undo.
define buffer customer for...
Working with transactions, I found the following problem / imagined scenario.
A record needs to be updated and for that I used strong scope, transaction and proper lock, like so:
def buffer customer for customer.
do for customer trans.
find customer exclusive-lock where...
Try single-quotes for the field value since you are using double-quote for the field alias, as such:
'' as "exit_date",
'' as "school_year"
and so on. Maybe it will work.
Sorry for the type.
Since I am doing a NO-LOCK find, other session could still do a EXCLUSIVE-LOCK find and get the record LOCK and then update the record.
There's a very little chance indeed of the record change but I wanted to be sure and the FIND CURRENT is to see if the record data...
It worked! Rereading the documentation, using a character variable it showed me the changed field. Using a logical variable it returns TRUE when nothing has changed and FALSE when any field has changed (for me this is kind of counterintuitive, but now I got it).
Thx a lot for the help and...
Exactly what I would like. Before posting this question I searched and tested it on "BUFFER-COMPARE source TO target", but I couldn't figure out how to create an example that would work.
From what I've read this function only compares the field types and not the field values. Here's what I...
Imagine the following scenario:
I have a client who only needs to be updated if they meet certain criteria based on their own data. I can only update the record if it meets the criteria (so I only lock the record after the IF statements, when necessary) and the data I was based on cannot have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.