我有以下表格:
$.getJSON("/static/json/data.json", function(data) {
$.each(data.features, function(key, val){
$.each(val.geometry, function(i, g){
if (g ==="Point") {
x = 1;
} else{
var myLatlng = new google.maps.LatLng(g[1], g[0]);
var marker = new google.maps.Marker({
position: myLatlng,
map: map
});
}
})
});
});
我需要从Technician
Tech_ID,First_Name,Last_Name
RT_QUEUE_Delta
Tech_ID, RT_Complete` (references a `Tech_ID` in `Technician`).
RT_Queue_Delta
中的一行获取数据,但在我的输出中,我需要将RT_Completed = ??
和First_Name
e与{{{}}相关联1}}和Last_nam
。
我可以匹配一个,但我不知道如何匹配两者。我试过了:
Tech_id
答案 0 :(得分:1)
您可以多次加入Technician
表:
select d.tech_id, t.first_name, t.last_name,
d.rt_completed as completed_id,
t2.first_name as completed_first_name,
t2.last_name as completed_last_name
from RT_QUEUE_Delta d
join Technician t on d.tech_id = t.tech_id
join Technician t2 on d.RT_Completed = t2.tech_id