Fetch and insert the data