I have the following table as the result of a query say calc_success_rate
server, service, timestamp, success_rate
123.23.23.2 ftp 1:00 am 1
123.23.23.2 http 1:00 am 0.5
I want to insert these values into another table say metrics whose structure is as follows
server ftpSuccessRate httpsuccessrate timestamp
123.23.23.2 1 0.5 1:00
I will be doing a join between calc_success_rate.server and metrics.server and calc_success_rate.timestamp and metrics.timestamp and insert the ftpsuccessrate and httpsuccessrate
Is it possible to do this in one query
I need an update statement something like this
update secondTable st
set ftpSuccessRate = , httpSuccessRate =
from firstTable ft
where ft.server = st.server and ft.timestamp = st.timestamp