AccessTr.neT
order by da hata - Baskı Önizleme

+- AccessTr.neT (https://accesstr.net)
+-- Forum: AccessTr.neT Genel (https://accesstr.net/forum-accesstr-net-genel.html)
+--- Forum: Çöp Kutusu (https://accesstr.net/forum-cop-kutusu.html)
+--- Konu Başlığı: order by da hata (/konu-order-by-da-hata.html)



order by da hata - demir02 - 20/05/2012

Merhaba,

benim verilerimde şöyle birşey var,

ogrID ogrSNo ogrler ogrAdeti ogrSinif

gibi bilgileri tutuyorum

bir sorgu yazdım şöyleki
select ogrSNo,ogrler,ogrAdeti,ogrSinif from tbl_ogrler where ogrID=@gID group by ogrSNo

yapmak istiyorum yalnız ogrSNo ogrler ve ogrSinif verileri birbirinde farklı kendi içlerinde aynı olduğunda şöyle bir hata alıyorum:

Column 'tbl_ogrler.ogrSinif ' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.


bu durumu nasıl çözebilirim ?

iyi çalışmalar...


Cvp: order by da hata - chopper07 - 20/05/2012

öncelikle örneğimizi ekleyelim lütfen.


Cvp: order by da hata - alpeki99 - 20/05/2012

Gruplamak istediğiniz alan Otomatik Sayı/Birincil Anahtar türünde bir alan mı?