You are here: Re: 2 where clause in same statement Mysql 4.2 « MySQL Databases « IT news, forums, messages
Re: 2 where clause in same statement Mysql 4.2

Posted by Matthias Hoys on 09/28/99 11:19

"Xavier Houppertz" <houppertzx@yahoo.com> wrote in message
news:wbSte.287781$Uh3.71153@biebel.telenet-ops.be...
> Hello,
>
> I am experiencing problems in writing an sql query.
> I would like to do a select count (pn_uid) where pn_did > 10 AND where
> pn_did > 500 goup by and sort by
>
> Of course if i do this I get everything that is above 500 (say 75)
>
> But I would like a result like Uid >10 >500
> 18 25 75
>
> I tried UNION, but I get two lines
> Uid Tot
> 18 25
> 18 75
>
> And i would like one ....
>
> Ideas please ?
>
> thanks,
> Xavier
>
>

Maybe you can do a SELECT on your UNION query ?

SELECT ... FROM
(SELECT ... FROM ... WHERE pn_did > 10
UNION
SELECT ... FROM ... WHERE pn_did > 500
)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация