You are here: Re: should be easy query question « MsSQL Server « IT news, forums, messages
Re: should be easy query question

Posted by Jim on 09/28/82 11:24

In article <1124379392.558896.286470@z14g2000cwz.googlegroups.com>, Tim wrote:
> not surprisingly, it's the difficult option I'm after where I want to
> return all customers who have bought productA and productB.
>

Try something like:

select custid from table where product='ProductA' and custid in
(select custid from table where product='ProductB') order by custid

Can't promise it will work but a few tests of the results should prove
it one way or the other.

Jim
--
Find me at http://www.ursaMinorBeta.co.uk
"There's no 'I' in team, but there is a 'me' if you jumble
the letters up a bit." - Dr. House.

 

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

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