Benjamin S. Rogers wrote:
>>Sure. I would use:
>>
>>SELECT     *
>>FROM       SourceIPSpamCount
>>ORDER BY   SourceIP
>>
>>But I don't use MS SQL Server ;-)
>
> I'm afraid that comment was lost on me? If you could give me a bit more
> information, perhaps I could come up with an equivalent in SQL Server
> for Tony.

Somebody wrote IP, network and MAC datatypes for PostgreSQL,
including support for the big seven operators. So I could just
use the IP datatype for SourceIP and everything would work
automagically:

jochemd=> create table iptest (ip inet);
jochemd=> insert into iptest (ip) values ('10.0.17.3');
jochemd=> insert into iptest (ip) values ('10.0.1.3');
jochemd=> insert into iptest (ip) values ('10.1.1.3');
jochemd=> insert into iptest (ip) values ('1.1.1.3');
jochemd=> insert into iptest (ip) values ('9.9.9.9');
jochemd=> select * from iptest order by ip ;
     ip
-----------
  1.1.1.3
  9.9.9.9
  10.0.1.3
  10.0.17.3
  10.1.1.3
(5 rows)
jochemd=>

Since it is my understanding that you can't write your own
operators in MS SQL Server, I doubt this is going to fly.

Jochem


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to