September 1, 2013 at 3:14 pm
Thanks,
RT.
September 1, 2013 at 4:09 pm
Homework?
Have you tested the query? What is wrong with it?
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
September 1, 2013 at 4:15 pm
It was showing an error and didn't executed!!!
September 1, 2013 at 4:16 pm
What error?
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
September 1, 2013 at 4:22 pm
Getting duplicate entries!!
September 1, 2013 at 4:26 pm
No, that's not an error message (and it's not the one that query will throw)
What error does that query throw?
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
September 1, 2013 at 11:15 pm
what result you are getting with this query and what output you want?
please provide some more detailed information
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
September 1, 2013 at 11:55 pm
You might get this error
"is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause."
this is because you can select only the columns which are there in the GROUP BY clause.
Try this
SELECT AccountID
FROM Account
WHERE
CreateDate > '2/1/2013'
GROUP BY AccountID
HAVING
COUNT(AccountID) >1
September 2, 2013 at 2:47 am
saravanakumar.G (9/1/2013)
You might get this error ...
So much for trying to get someone to figure out their homework for themselves.... He learns nothing by being given the answer.
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 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply