CREATE PROCEDURE sp_Accounts_GetAddressbyIp
(
@Ip varchar(50)
)
ASexec('SELECT TOP 1 * FROM pub_ipaddress WHERE ''+ @ip +'' between startip and endip ORDER BY endip')
GO
(
@Ip varchar(50)
)
ASexec('SELECT TOP 1 * FROM pub_ipaddress WHERE ''+ @ip +'' between startip and endip ORDER BY endip')
GO
exec('SELECT TOP 1 * FROM pub_ipaddress WHERE '''+ @ip +''' between startip and endip ORDER BY endip')