I'm hoping that someone can help me figure out how to do this. I've done some searches but I haven't been able to decipher what exactly is being done in the other queries.
I have a table, PositionSets, which lists the X, Y, and Z coordinates for 15 different turbine units (fields: UnitName, PointX, PointY, PointZ).
I have a query, ExitAssignment, which lists the last X, Y, and Z of each Tag (fields TagCode, PointX, PointY, PointZ).
What I need to do is create a query where I can get the UnitName from PositionSets where that unit's X, Y and Z is closest to the Tag's X, Y and Z.
Does that make sense? I don't know if this is something terribly easy or complicated. I didn't find a lot of information.
Sample data:
table PositionSets
UnitName PointX PointY PointZ
TU1 2132201 194401 601
TU2 2132259 194458 698
TU3 2132515 194613 704
query ExitAssignment
TagCode PointX PointY PointZ
3996 2132487 194626 590
4030 2132231 194506 686
4056 2132310 194434 682
5201 2134579 195013 704
I don't know the math, so I'm not sure if you need to evaluate all three points (X,Y,Z) to find the nearest or just X and Y.
Any help is greatly appreciated. Thanks.
I have a table, PositionSets, which lists the X, Y, and Z coordinates for 15 different turbine units (fields: UnitName, PointX, PointY, PointZ).
I have a query, ExitAssignment, which lists the last X, Y, and Z of each Tag (fields TagCode, PointX, PointY, PointZ).
What I need to do is create a query where I can get the UnitName from PositionSets where that unit's X, Y and Z is closest to the Tag's X, Y and Z.
Does that make sense? I don't know if this is something terribly easy or complicated. I didn't find a lot of information.
Sample data:
table PositionSets
UnitName PointX PointY PointZ
TU1 2132201 194401 601
TU2 2132259 194458 698
TU3 2132515 194613 704
query ExitAssignment
TagCode PointX PointY PointZ
3996 2132487 194626 590
4030 2132231 194506 686
4056 2132310 194434 682
5201 2134579 195013 704
I don't know the math, so I'm not sure if you need to evaluate all three points (X,Y,Z) to find the nearest or just X and Y.
Any help is greatly appreciated. Thanks.