On 09/24/2009 11:59:21 PM, Tony wrote: > Apologies for the previous duplicate post.
> for a single /24. This is because it's a CHAR value and so it's > ordered "alphabetically". > > Is there a way to sort it properly by IP address (so that .2 comes > after .1) in either an SQL query or in an XLS sheet ? Yes, but I don't know the best way offhand. You can either have your sql sort by an expression or put that expression into a function (I think mysql supports this) and sort by the function result. The worst sort of expression would retain the char datatype and just pad each dotted quad with 0s on the left. I'm sure there's a better approach and somebody's probably already implemented it. Karl <[email protected]> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
