So, do you know how to use FINDSET function? Of course you do… you always use it like IF FINDSET THEN REPEAT UNTIL… right? You have it in your blood. You have used it so many times… you can’t even remember when was the first time you have used FINDSET. This must be the easiest question, you can get on technical interview, right?
Well… let’s dig deeper. What parameters has function FINDSET? TRUE, FALSE? FALSE, FALSE? No… I meant, what parameters, as in what do they do?
… Western-movie-type silence …
Obviously, I have helped you here with a screenshot above… but once, when I got this question, I was not able to answer it. And I think that is the main reason why now, I could remember this, even if you would wake me up in the middle of the night –
Set this parameter to true if you want to modify any records in the set; otherwise, set the parameter to false.
If you set this parameter to true, then the LOCKTABLE Function (Record) is immediately run on the table before the records are read.
Set this parameter to true if you want to modify any field value within the current key.
This parameter only applies if the ForUpdate parameter is true.
So, as they say, now you know…
Next question: Why are you still not using parameters in this function?