Click here to Skip to main content
15,903,856 members
Home / Discussions / Database
   

Database

 
QuestionLinkedIn's database Pin
Jassim Rahma23-May-11 2:08
Jassim Rahma23-May-11 2:08 
AnswerRe: LinkedIn's database Pin
R. Giskard Reventlov23-May-11 2:11
R. Giskard Reventlov23-May-11 2:11 
AnswerRe: LinkedIn's database Pin
Pete O'Hanlon23-May-11 2:59
mvePete O'Hanlon23-May-11 2:59 
GeneralRe: LinkedIn's database Pin
wizardzz24-May-11 10:50
wizardzz24-May-11 10:50 
QuestionmySQL on 64bit Pin
Jassim Rahma22-May-11 3:35
Jassim Rahma22-May-11 3:35 
QuestionSQL Server Connection Failure Pin
εїзεїзεїз21-May-11 22:47
εїзεїзεїз21-May-11 22:47 
AnswerRe: SQL Server Connection Failure Pin
GenJerDan22-May-11 4:13
GenJerDan22-May-11 4:13 
QuestionGroup By All Columns except the image field Pin
Vimalsoft(Pty) Ltd21-May-11 9:00
professionalVimalsoft(Pty) Ltd21-May-11 9:00 
Good evening all

i have an image in my select fields, and i know that the Group by clause cant take the Image field, i have a query that looks like this


SELECT      
K.KIDID,      
K.STUDENTNUMBER,      
KIDNAME,      
KIDLASTNAME ,      
SC.SCHOOLNAME ,      
KIDGRADE ,      
KIDCLASS ,      
SC.SCHOOLID,  
k.TEMP_BARCODE,
PHOTO,
A.ACCOUNTID
,SUM(TRANSACTION_AMOUNT) AS [BALANCE]  
FROM       
KIDS_DETAILS K      
INNER JOIN SCHOOL SC       
ON K.SCHOOLID = SC.SCHOOLID      
INNER JOIN PARENTKID PK       
ON PK.KIDID = K.KIDID
INNER JOIN USERS U 
ON U.USERID  = K.USERID 
INNER JOIN ACCOUNTS A 
ON A.USERID = U.USERID
INNER JOIN ACCOUNTRANSATIONS AT
ON AT.ACCOUNTID  = A.ACCOUNTID
LEFT OUTER JOIN KIDSPHOTO KP
ON KP.KIDID = K.KIDID
 
  GROUP BY
K.KIDID,      
K.STUDENTNUMBER,      
KIDNAME,      
KIDLASTNAME ,      
SC.SCHOOLNAME ,      
KIDGRADE ,      
KIDCLASS ,      
SC.SCHOOLID,  
k.TEMP_BARCODE,
A.ACCOUNTID,
PHOTO


now as you can see there is a part where i sum , but now i have a PHOTO column, how can i remove this with out getting the common exception that will tell me that Photo is not in

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


and if i include it i will get the group by Clause limitation of the Type Text , image

Msg 306, Level 16, State 2, Line 40
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

AnswerRe: Group By All Columns except the image field Pin
Vimalsoft(Pty) Ltd21-May-11 9:44
professionalVimalsoft(Pty) Ltd21-May-11 9:44 
GeneralRe: Group By All Columns except the image field Pin
Shameel25-May-11 8:20
professionalShameel25-May-11 8:20 
QuestionDataset folder Pin
paper6721-May-11 5:59
paper6721-May-11 5:59 
AnswerRe: Dataset folder Pin
Eddy Vluggen23-May-11 0:25
professionalEddy Vluggen23-May-11 0:25 
QuestionOpenRowSet - Sql server Pin
Hum Dum20-May-11 19:58
Hum Dum20-May-11 19:58 
AnswerRe: OpenRowSet - Sql server Pin
Shameel25-May-11 8:14
professionalShameel25-May-11 8:14 
QuestionSQL Mystery Pin
Super Lloyd20-May-11 4:46
Super Lloyd20-May-11 4:46 
AnswerRe: SQL Mystery Pin
Chris Meech20-May-11 7:48
Chris Meech20-May-11 7:48 
QuestionSQL Stored Procedure Question??? Pin
Toniyo Jackson19-May-11 21:47
Toniyo Jackson19-May-11 21:47 
AnswerRe: SQL Stored Procedure Question??? PinPopular
dasblinkenlight20-May-11 0:59
dasblinkenlight20-May-11 0:59 
AnswerRe: SQL Stored Procedure Question??? Pin
David Skelly20-May-11 1:50
David Skelly20-May-11 1:50 
QuestionOracle partitioned indexes... Pin
Paladin200019-May-11 2:51
Paladin200019-May-11 2:51 
AnswerRe: Oracle partitioned indexes... Pin
Paladin200019-May-11 4:11
Paladin200019-May-11 4:11 
Questionimage databasee Pin
mrjaya18-May-11 19:17
mrjaya18-May-11 19:17 
AnswerRe: image databasee Pin
Mycroft Holmes18-May-11 19:35
professionalMycroft Holmes18-May-11 19:35 
Questionstring concadination in sql query Pin
yesu prakash17-May-11 20:39
yesu prakash17-May-11 20:39 
AnswerRe: string concadination in sql query [modified] Pin
Blue_Boy17-May-11 21:02
Blue_Boy17-May-11 21:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.