You are here: Re: HAVING prob ! « MsSQL Server « IT news, forums, messages
Re: HAVING prob !

Posted by daoud97@yahoo.com on 06/02/06 12:39

daoud97@yahoo.com schreef:

> daoud97@yahoo.com schreef:
>
> > markc600@hotmail.com schreef:
> >
> > > SELECT Mat,
> > > 'd' AS Dur
> > > FROM MAND
> > > GROUP BY Mat
> > > HAVING COUNT(*)=2 AND COUNT(DISTINCT Dur)=1
> >
> > Sorry, it's not correct :
> >
> > if i insert
> >
> > 36000 i
> > 36000 i
> >
> > and apply your SQL, i have some result like :
> >
> > 10000 d
> > 16030 d
> > 31217 d
> > 36000 d (????)
> >
> > perhaps, i d'ont expline vers well !
>
> I will try to expline more :
>
>
> this is the table with groups:
>
> Mat Dur
> 16030 d
> 16030 i
>
> 31217 i
> 31217 d
> 31217 d
> 31217 d
>
> 10000 d
> 10000 d
> 10000 d
>
> 35000 d
>
>
>
> I'am interested only by the 2 groups : 10000 and 35000 because the
> haven't any 'i' in the colonn Dur.

 

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

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