Re: [HACKERS] AND &&
От | Don Baccus |
---|---|
Тема | Re: [HACKERS] AND && |
Дата | |
Msg-id | 3.0.1.32.19991215082736.0109b040@mail.pacifier.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] AND && (Vince Vielhaber <vev@michvhf.com>) |
Список | pgsql-hackers |
At 11:00 AM 12/15/99 -0500, Vince Vielhaber wrote: >Thomas Lockhart <lockhart@alumni.caltech.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 0end) > 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@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert Serviceand other goodies at http://donb.photo.net.
В списке pgsql-hackers по дате отправления: