You are here: Re: Please Help with SQL Query Problem « MsSQL Server « IT news, forums, messages
Re: Please Help with SQL Query Problem

Posted by Erland Sommarskog on 07/06/06 22:38

Paradyse (support@paradysed.com) writes:
> I appreciate your help but it's giving me an error in the Group clause.
> Any ideas?

There is a general recommendation for questions about help with queries,
and that is that you post:

o CREATE TABLE statements for your table(s). (Preferably simplified for
the problem at hand).
o INSERT statements with sample data.
o The desired output given the sample.

That makes it very easy to copy and paste into a query tool to develop
a tested solution. It also shows that you are prepared make some effort
yourself to solve the problem.

Since you did not post any sample data, MC posted an untested solution.
Apparently it had an error, but at least you got something to work from.
The error I can spot in his suggestion is that dbo.Photos.RecordID should
be Photos.RecordID. Photos here is a derived table, a virtual table
constructed on the fly in the middle of the query; a very powerful
construct.

So try to work from this. If you still get an error message, and get passed
it - make yourself a favour and post the error message next time.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

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

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