Michael Glaesemann <[EMAIL PROTECTED]> writes:
> What's ambigious about it? An operator cannot include a space, so !=
> (no space) is *always* interpreted as one operator: not equals (<>).
Right. There are some corner cases though, for example
A*-5
which you'd probably rather weren't
On Sep 11, 2007, at 13:42 , David Fetter wrote:
I believe that foo!=bar without white space should simply error out
because there is no reasonable, unambiguous way to parse it. Here's
what we get right now:
What's ambigious about it? An operator cannot include a space, so !=
(no space) is
On Tue, Sep 11, 2007 at 02:28:24PM -0400, Tom Lane wrote:
> "George Pavlov" <[EMAIL PROTECTED]> writes:
> >> From: David Fetter [mailto:[EMAIL PROTECTED]
> >> This case statement returns true when z factorial is zero, so I'd
> >> recommend the SQL standard <> or IS NOT DISTINCT FROM instead.
>
> >
"George Pavlov" <[EMAIL PROTECTED]> writes:
>> From: David Fetter [mailto:[EMAIL PROTECTED]
>> This case statement returns true when z factorial is zero, so I'd
>> recommend the SQL standard <> or IS NOT DISTINCT FROM instead.
> i do hate potential ambiguity... the != was something stuck in my bra
> From: David Fetter [mailto:[EMAIL PROTECTED]
> On Tue, Sep 11, 2007 at 08:55:53AM -0700, George Pavlov wrote:
> > sum(case when z!=0 then 1 end) as good,
>
> This case statement returns true when z factorial is zero, so I'd
> recommend the SQL standard <> or IS NOT DISTINCT FROM instead.
and
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Jeff
> Lanzarotta
> Sent: Tuesday, September 11, 2007 8:51 AM
> To: PostgreSQL GENERAL List
> Subject: [GENERAL] Question about a query with two count fields
>
> Hello,
>
>
Remove the ", 0 AS ajaa", that was some filler that got
thru by mistake.
---(end of broadcast)---
TIP 6: explain analyze is your friend
ssage-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Jeff
> > Lanzarotta
> > Sent: Tuesday, September 11, 2007 8:51 AM
> > To: PostgreSQL GENERAL List
> > Subject: [GENERAL] Question about a query with two count fields
> >
&
On 9/11/07, Jeff Lanzarotta <[EMAIL PROTECTED]> wrote:
> I appreciate the help...
SELECT TO_CHAR(ts, 'MM/DD/') AS "day", str, proc
, SUM(CASE
WHEN z <> 0
THEN 1
ELSE 0
END) AS good, 0 AS ajaa
, SUM(CASE
o:[EMAIL PROTECTED] On Behalf Of Jeff
> Lanzarotta
> Sent: Tuesday, September 11, 2007 8:51 AM
> To: PostgreSQL GENERAL List
> Subject: [GENERAL] Question about a query with two count fields
>
> Hello,
>
> I am in need of producing a query that has two count fields
>
Hello,
I am in need of producing a query that has two count fields in it... Something
like:
select to_char(ts, 'MM/DD/') as "day", str, proc,
(select count (*) as good from foobar where z != 0),
(select count (*) as bad from foobar where z = 0)
from foobar
where str != 9
group by str, da
11 matches
Mail list logo