if((select [paraCliente] from [seg_perfil] where [id]=3 and [perfil]='Cliente')is null)
begin
UPDATE [seg_perfil] SET paraCliente = 1 WHERE [id]=3 and [perfil]='Cliente' 
end
UPDATE [seg_perfil] SET [paraCliente] = 0 where [paraCliente]is NULL
UPDATE [seg_perfil] SET[paraProveedor] = 0 where [paraProveedor]is NULL
