I am currently looking to join two tables together based on an IP and IP range. Both the IP and Range are currently stored as BIGINT.
For example we have a table MasterData with IPs in integer format [IPInteger] and we have another table called IPInformation which has all IP data but also has [start_ip_int] and [end_ip_int] range.
What I would like to to is join all the data in MasterData and All the data in the IPInformation based on the IPInteger being within the range of [start_ip_int] and [end_ip_int] on the IPInformation table.
Thanks in advance for any assistance you can provide.
Best Answer
Following is the SQL Server version in steps to work on IPs Range this might help you to convert in SqL
Step 1: Create function [usp_stringpart] in your Database
Step 2: Add Column to save integer value of IPs
Step 3: Convert IPs to Integers
Step 4: Get IPs