Hi,
Im my appp, there is a stored proc that loops through one table and finds a matching entry in another table and updates both tables 'RecordMatchID' field with the same integer value.
With this data, 99.9% of the time there is a one-to-one match - however, occasionally, the source table will have one record that "matches" to two records in the second table.
Currently when I update the second table, I use something like this:
Update SecondTable
set SecondTable.RecordMatchID = @MatchIN
where SecondTable.MatchCriteriaVC = @MatchVC
What I'd like to do in the .01% of the cases where there are more than one matching record - is to just update 'SecondTable' for the first occurance where the matching criteria is met ...
Any suggestions on how to best approach this?
Al Williams
Anola MB, CANADA