Comparing integer values across tables and across database servers

  • I need some guidance on how best to approach a problem involving two tables across two different servers.

    Table 1: Contains IP Address along with assessment findings. Lets say the fields are IPADDRESSSTR, FINDING

    Table 2: Contains Subnet information stored in integer format. The fields are SITE_ID, LOW, and HIGH

    What I'd like to do is load the IP range information into memory and then return the findings from table 1 where the IPADDRESSSTR is between the LOW and HIGH integer value.

    What is the most efficient way to approach this problem?

    Questions:

    1) Is there a way to load all of the ranges from table 2 into an array and then compare all the IP addresses (IPADDRESSSTR) from table 1?

    2) How do I convert IPADDRESSSTR (a string) to an integer to perform the comparison.

    Thank you in advance for your guidance.

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply