Hi guys,

I have the following query...

SELECT clubroom.cb_id, clubroom.cb_dCreated, clubroom.cb_dModified,
clubroom.cb_content, clubroom.cb_isArchive,
COUNT(clubroom_images.cbi_id) AS image_count
FROM clubroom LEFT OUTER JOIN clubroom_images
ON clubroom.cb_id = clubroom_images.cb_id
GROUP BY clubroom.cb_id, clubroom.cb_dCreated, clubroom.cb_dModified,
clubroom.cb_content, clubroom.cb_isArchive
ORDER BY clubroom.cb_dCreated DESC

And get the following error...

Error Executing Database Query.  
[Macromedia][SQLServer JDBC Driver][SQLServer]The text, ntext, and image
data types cannot be compared or sorted, except when using IS NULL or
LIKE operator. 

Now I have checked the elements and it appears that the error is
relating to the cb_content field which is a text field. When this is
removed from the query the query runs fine.

In order to use the COUNT function I need to have the GROUP BY ?? and I
also need the cb_content field.

Any help would be greatly appreciated by this SQL dummie!

Mike :o)



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251550
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to