Re: [SQL] ORDER BY TIMESTAMP_column ASC, NULL first

2004-06-03 Thread Bruno Wolff III
On Thu, Feb 12, 2004 at 11:06:26 +0100, Fredrik Wendt <[EMAIL PROTECTED]> wrote: > > The query to use would be, > > SELECT ip.id FROM IPv4Address ip ORDER BY assignedAt ASC LIMIT 1; > > with the exception that this returns rows with NULL at the end, instead > of at the beginning which is

Re: [SQL] ORDER BY TIMESTAMP_column ASC, NULL first

2004-06-03 Thread Denis
TED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, February 16, 2004 12:32 AM Subject: Re: [SQL] ORDER BY TIMESTAMP_column ASC, NULL first > On Thu, 2004-02-12 at 05:06, Fredrik Wendt wrote: > > Hi! > > > > I read posts telling me that NULL values are considered greater than

Re: [SQL] ORDER BY TIMESTAMP_column ASC, NULL first

2004-02-15 Thread Rod Taylor
On Thu, 2004-02-12 at 05:06, Fredrik Wendt wrote: > Hi! > > I read posts telling me that NULL values are considered greater than > non-null values. Fine. Is there a way to explicitly reverse this? ORDER BY column IS NOT NULL, column ASC; ---(end of broadcast)

Re: [SQL] ORDER BY TIMESTAMP_column ASC, NULL first

2004-02-15 Thread Stephan Szabo
On Thu, 12 Feb 2004, Fredrik Wendt wrote: > I read posts telling me that NULL values are considered greater than > non-null values. Fine. Is there a way to explicitly reverse this? Not directly, but I think ORDER BY assignedAt IS NOT NULL, assignedAt ASC will give the ordering you want at the co

Re: [SQL] ORDER BY TIMESTAMP_column ASC, NULL first

2004-02-15 Thread Tomasz Myrta
Dnia 2004-02-12 11:06, Użytkownik Fredrik Wendt napisał: Hi! I read posts telling me that NULL values are considered greater than non-null values. Fine. Is there a way to explicitly reverse this? Sure, choose combination you need: order by some_value is null asc/desc, some_value asc/desc Regard

[SQL] ORDER BY TIMESTAMP_column ASC, NULL first

2004-02-15 Thread Fredrik Wendt
Hi! I read posts telling me that NULL values are considered greater than non-null values. Fine. Is there a way to explicitly reverse this? I have the situation where a table holds IP-addresses. The table has column of type timestamp, called assignedAt, which tells when the address was assigned to