MySQL Forums
Forum List  »  Stored Procedures

MATCH TWO TABLE
Posted by: ulas keskin
Date: April 01, 2016 02:01AM

i have two table which contains network access datas.
one has
mac and time information
second one has
mac time ip information

i need to match two table with stored procedure
because for mac that has lots of rows both tables.

TABLE1
mac TIME1
4C0F6E6B49FC 2015-05-31 16:00:00
4C0F6E6B49FC 2015-05-31 15:00:00
4C0F6E6B49FC 2015-05-31 14:00:00
4C0F6E6B49FC 2015-05-20 18:00:00
4C0F6E6B49FC 2015-05-19 14:00:00

TABLE2
MAC TIME2 IP
4C0F6E6B49FC 2015-05-24 11:00:00 192.168.1.50
4C0F6E6B49FC 2015-05-16 11:00:00 192.168.1.49
4C0F6E6B49FC 2015-05-08 11:00:00 192.168.1.48

OUTPUT SHOULD BE
mac TIME1 TIME2 IP
4C0F6E6B49FC 2015-05-31 16:00:00 2015-05-24 11:00:00 192.168.1.50
4C0F6E6B49FC 2015-05-31 15:00:00 2015-05-24 11:00:00 192.168.1.50
4C0F6E6B49FC 2015-05-31 14:00:00 2015-05-24 11:00:00 192.168.1.50
4C0F6E6B49FC 2015-05-20 18:00:00 2015-05-16 11:00:00 192.168.1.49
4C0F6E6B49FC 2015-05-19 14:00:00 2015-05-16 11:00:00 192.168.1.49

Options: ReplyQuote


Subject
Views
Written By
Posted
MATCH TWO TABLE
2612
April 01, 2016 02:01AM
792
April 01, 2016 10:48AM
736
April 13, 2016 06:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.