March 25, 2011 at 6:28 am
HI,
select Hostname,SPID, startTime, EndTime, duration from Bribs_Trace_25032011
where loginname='Bribs' and endtime is not null
Group by Hostname,SPID, startTime, EndTime, duration
Order by SPID, duration
This query wroking fine
I want to modify tes
select textdata, Hostname,SPID, startTime, EndTime, duration, servername from Bribs_Trace_25032011
where loginname='Bribs' and endtime is not null
Group by textdata,Hostname,SPID, startTime, EndTime, duration, servername
Order by SPID, duration
Server: Msg 306, Level 16, State 2, Line 1
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
Please give me solution, how to modify this Query?
Thanks
ananda
March 25, 2011 at 7:07 am
Why are you grouping at all? Group By is for controlling data break-down on aggregate functions.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 25, 2011 at 7:14 am
Thanks for reply--
Group by function - need to specify for all select column..
March 25, 2011 at 7:16 am
ananda.murugesan (3/25/2011)
Thanks for reply--Group by function - need to specify for all select column..
Why? For this query, it's not doing anything useful that I can see.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 25, 2011 at 7:17 am
ananda.murugesan (3/25/2011)
Thanks for reply--Group by function - need to specify for all select column..
You're not doing any form of aggregation, so the group by is completely unnecessary.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 25, 2011 at 7:21 am
Thanks for yours reply ....
March 25, 2011 at 7:30 am
Please tell me, SQL Profiler trace data duration column is Mi.Sec or Sec?
thanks
March 25, 2011 at 7:36 am
On SQL 2000 it's in milliseconds
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply