|
Posted by Dan Guzman on 10/04/06 11:50
When you have a GROUP BY clause, columns in the select list must be in the
GROUP BY or in an aggregate function.
It's unclear to me what you are trying to accomplish with this query since
you are grouping by DOCInt.IDDoc but requesting all columns. What results
are you expecting?
--
Hope this helps.
Dan Guzman
SQL Server MVP
<iulian.ilea@gmail.com> wrote in message
news:1159962215.763990.115140@b28g2000cwb.googlegroups.com...
> What is wrong int this SQL statement?
>
> select top 10 DOCInt.*, DOCDet.* , Cate.*, Arti.*, [Ar An].*
> from
> DOCInt INNER JOIN DOCDet ON DOCInt.CodDoc=DOCDet.CodDoc
> LEFT JOIN Cate ON DOCDet.IDCategory=Cate.[ID Category]
> LEFT JOIN Arti ON DOCDet.IDArti=Arti.[ID Arti]
> INNER JOIN [Ar An] ON DOCInt.IDAnag=[Ar An].[ID An]
> GROUP BY DOCInt.IDDoc
>
Navigation:
[Reply to this message]
|