From: | Don Baccus <dhogaza(at)pacifier(dot)com> |
---|---|
To: | Vince Vielhaber <vev(at)michvhf(dot)com>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
Cc: | hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] AND && |
Date: | 1999-12-15 16:27:36 |
Message-ID: | 3.0.1.32.19991215082736.0109b040@mail.pacifier.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At 11:00 AM 12/15/99 -0500, Vince Vielhaber wrote:
>Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> said:
>
>> > I think I asked this before but don't recall seeing an answer. Do we
>> > have a logical AND?
>>
>> Uh, yes. It's called "AND" ;)
>
>That's what I was afraid of.
>
> ERROR: left-hand side of AND is type 'int4', not bool
>SELECT (( sum(case dict.word when 'enable' then 1 else 0 end) && sum(case
>dict.word when 'test' then 1 else 0 end)))
try something like
select ((sum(case dict.work when 'enable' then 1 else 0 end) > 0 and
sum(case dict.word when 'test' then 1 else 0 end) > 0))
or perhaps rewrite the query to use "exists"??? That appears to be the
point of this snippet.
Apparently mySQL is misnamed. Perhaps it should be renamed myC-ishQL.
- Don Baccus, Portland OR <dhogaza(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 1999-12-15 16:49:43 | Re: [HACKERS] dumpall prob |
Previous Message | Patrick Welche | 1999-12-15 16:24:27 | dumpall prob |