[sql] matching records from 2 tables with multiple fields
by schneidz from LinuxQuestions.org on (#4ZHPQ)
hi, i am wanting to pull records from a query like so:
Code:table-1:
claim-prefix claim-id claim-segment-number member-id
s al3r 0 chun-li
a h3l0 1 ryu
...
table-2:
claim date
sal3r00 2020-02-18-12:00:00
msux005 2020-02-18-13:00:00
...and i wanna':
Code:select claim, member-id, date
from table-1, table-2
where claim = 'sal3r00'
and claim-prefix+claim-id+char(claim-segment-number) = claim
order by date desc
with ur;
--------------------
sal3r00 chun-li 2020-02-18-12:00:00but i cant punch up the correct syntax ?


Code:table-1:
claim-prefix claim-id claim-segment-number member-id
s al3r 0 chun-li
a h3l0 1 ryu
...
table-2:
claim date
sal3r00 2020-02-18-12:00:00
msux005 2020-02-18-13:00:00
...and i wanna':
Code:select claim, member-id, date
from table-1, table-2
where claim = 'sal3r00'
and claim-prefix+claim-id+char(claim-segment-number) = claim
order by date desc
with ur;
--------------------
sal3r00 chun-li 2020-02-18-12:00:00but i cant punch up the correct syntax ?