Matching process , issue with query
- by Blerta Blerta
i have this code which helps me match two different tables.. now, each of this tables, has a epos_id and a rbpos_id ! I have another table which has pairs of rbpos_id and epos_id, something like:
id | epos_id | rbpos_id
1 a3566 465jd
2 hkiyb rbposi
When i join this other table, i need to check this condition, i mean, the matching should be done, only and if, the epos_id and rbpos_id of the join i'm doing, have the same id,i mean, belong to the same row..
Here is my current query...
Thanks!
SELECT retailer.date, retailer.time, retailer.location, retailer.user_id,imovo.mobile_number ".
"FROM retailer LEFT JOIN imovo ".
" ON addtime(retailer.time, '0:0:50')>imovo.time
AND retailer.time <imovo.time AND retailer.date=imovo.date