Distance Between Tow layers Based on Unique field with network analysis

Discussion created by yonatani on Apr 5, 2011
Latest reply on Aug 6, 2011 by yonatani
I'm Trying to Calculate the Shortest Distance Between Tow points within tow layers using unique code, based on network analyst.
The number of records in each table is similar.
Closest Facility does not match with my goal, because the output is a matrix from each point in the Base layer to each point in the Target Layer.
I can't do this manually, because the layers has more then one million records

My request  is, for example - to count the distance from field to filed that has the same unique number :
the distance field result should be: from unique 1 in layer A to Unique 1 in layer B
The number of records should be equal to the number of records in each table
I attached excel file for demo

Is their a Script, a Patch or Manual that preform this kind of function?

Thank you Very Much!
Locking foreword to your Answer