Some sample code to work with 
Declare @table table (ip varchar(15))Insert Into @table Select '68.142.201.3'Insert Into @table Select '68.142.192.0'Insert Into @table Select '68.143.200.157'Insert Into @table Select '132.189.214.0'Insert Into @table Select '25.189.214.0'--Maddy's shotselect ip from @table where replace(ip,'.','') between replace('68.142.192.0','.','') and replace('68.142.255.255','.','')--Counter exampleselect ip from @table where replace(ip,'.','') between replace('100.142.192.0','.','') and replace('255.142.255.255','.','')Declare @ip_Begin varchar(15), @ip_End varchar(15) Set @ip_Begin = '100.142.192.0'Set @ip_End = '255.142.192.0'/*Set @ip_Begin = '68.142.192.0'Set @ip_End = '68.142.255.255'*/Select * From @tableWhere right('000'+parsename(ip,4),3) + right('000'+parsename(ip,3),3) + right('000'+parsename(ip,2),3) + right('000'+parsename(ip,1),3)Between right('000'+parsename(@ip_Begin,4),3) + right('000'+parsename(@ip_Begin,3),3) + right('000'+parsename(@ip_Begin,2),3) + right('000'+parsename(@ip_Begin,1),3) And right('000'+parsename(@ip_End,4),3) + right('000'+parsename(@ip_End,3),3) + right('000'+parsename(@ip_End,2),3) + right('000'+parsename(@ip_End,1),3)Corey
Co-worker on The Wizard of Oz "...those three midgets that came out and danced, the freaked me out when I was little. But they are ok now."