ok very glad you can all give such a quick reply the only thing i can't get right it seems is the substring
the actual ip = 10. 18.132.0
and without te spaces i would think the substring wil have to be:

SubStr(@IPADDRESS0, 5, 3)

what am i seeing wrong here?