我想为我的客户找到最近的员工。
我有 2 张桌子
Customer_Master
Customer_ID Customer_Name Cust_Location
Cust100001 Subash 0xE6100000010C1B2E724F57172A408449F1F109685340
Cust100002 Naresh 0xE6100000010CBE30992A18152A4093AAED26F8675340
Employee_Master
Emp_ID Emp_name Emp_Location
Emp100001 Prakash 0xE6100000010C363B527DE7172A4069C36169E0675340
Emp100002 Suresh 0xE6100000010C98C3EE3B86172A4064E597C118685340
Emp100003 Vincent 0xE6100000010CE5B8533A58172A4090DD054A0A685340
Emp100004 Paul 0xE6100000010C2EE6E786A6142A40A0A696ADF5675340
我有客户和员工的位置。现在我想选择一个离客户最近的员工。
我尝试了以下显示错误的查询
Select Emp_ID
from Emp_Master
where Emp_ID.Emp_Location.STDistance
(
Select Cust_Location
from Cust_Master
where Cust_ID='Cust100001'
)