You are here: Help with select query « MsSQL Server « IT news, forums, messages
Help with select query

Posted by Bruno Panetta on 12/06/05 17:11

Suppose I have a table Orders with the following fields:

OrderID ProductID OrderDate

I would like a SELECT query to return those rows with multiple values
for both ProductID and OrderDate. For example suppose Orders contains
the following data

OrderID ProductID OrderDate
1 11 12-mar-2005
2 13 13-mar-2005
3 13 13-mar-2005
4 13 13-mar-2005
5 13 14-mar-2005
5 14 14-mar-2005
6 15 15-mar-2005
7 15 15-mar-2005

then the query would return the rows corresponding to OrderID's 2, 3,
4, 6, 7.
How can this be done?
Thanks.

 

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

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