Ntext field vs Group By

  • Thread starter Thread starter A_PK
  • Start date Start date
A

A_PK

I got one field, NOTE, its type is Ntext field.
I have problem when query the statement using GROUP BY, could some pls
kindly guide me.

please found the sql query below...

SELECT tblParent.indexno, tblParent.custno,
tblParent.compname, tblParent.tt, tblParent.ordnotes
FROM tblParent INNER JOIN
tblChild ON tblParent.tid = tblChild.tid
WHERE (tblchild.prodid BETWEEN N'1' AND N'z')
GROUP BY tblParent.indexno, tblParent.custno,
tblParent.compname, tblParent.tt !!!!!!!!! error here...i can not put
tblParent.ordnotes, because is is ntext field...no allow to sort or
compare.....

So, if I want to show all those field, but still using GROUP BY, cos I dun
want to dunplicate all the prodid...



Thank you very much
 
Hi,

The fields listed in the select statement are return with the
query. You can groupby only one field and still see all the fields
specified in the select statement

Ken
----------------------
I got one field, NOTE, its type is Ntext field.
I have problem when query the statement using GROUP BY, could some pls
kindly guide me.

please found the sql query below...

SELECT tblParent.indexno, tblParent.custno,
tblParent.compname, tblParent.tt, tblParent.ordnotes
FROM tblParent INNER JOIN
tblChild ON tblParent.tid = tblChild.tid
WHERE (tblchild.prodid BETWEEN N'1' AND N'z')
GROUP BY tblParent.indexno, tblParent.custno,
tblParent.compname, tblParent.tt !!!!!!!!! error here...i can not put
tblParent.ordnotes, because is is ntext field...no allow to sort or
compare.....

So, if I want to show all those field, but still using GROUP BY, cos I dun
want to dunplicate all the prodid...



Thank you very much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top