For that functionality you can use:
While[
^] loop, While loop +
cursor[
^] and the last one is
Common Table Expressions[
^].
I'm almost sure you can use simple
UPDATE + SELECT
query:
UPDATE t1 SET t1.DestinationField = t2.SourceField
FROM DestinationTable AS t1 INNER JOIN SourceTable AS t2 ON t1.Key = t2.ForeignKey
where
Key
- in your case - would be
Record_Number
.
[EDIT]
UPDATE t1 SET t1.AckTime = udf_GetAckTime(t2.AckTime)
FROM YourTableName AS t1 INNER JOIN YourTableName AS t2 ON t1.Record_Number = t2.Record_Number
[/EDIT]