Click here to Skip to main content
15,897,518 members
Home / Discussions / Database
   

Database

 
QuestionGrouped ordered precise select statement? Pin
Emmet_Brown5-Oct-10 2:45
Emmet_Brown5-Oct-10 2:45 
AnswerRe: Grouped ordered precise select statement? Pin
Emmet_Brown5-Oct-10 3:24
Emmet_Brown5-Oct-10 3:24 
AnswerRe: Grouped ordered precise select statement? Pin
Luc Pattyn5-Oct-10 3:30
sitebuilderLuc Pattyn5-Oct-10 3:30 
GeneralRe: Grouped ordered precise select statement? Pin
Emmet_Brown5-Oct-10 3:32
Emmet_Brown5-Oct-10 3:32 
GeneralRe: Grouped ordered precise select statement? Pin
Emmet_Brown5-Oct-10 3:34
Emmet_Brown5-Oct-10 3:34 
AnswerRe: Grouped ordered precise select statement? Pin
Emmet_Brown5-Oct-10 3:37
Emmet_Brown5-Oct-10 3:37 
GeneralRe: Grouped ordered precise select statement? Pin
Luc Pattyn5-Oct-10 3:42
sitebuilderLuc Pattyn5-Oct-10 3:42 
AnswerRe: Grouped ordered precise select statement? Pin
Mycroft Holmes5-Oct-10 13:06
professionalMycroft Holmes5-Oct-10 13:06 
Impatient bugger aren't you.

Look into row_number and partition over in BOL.

With these 2 commands you can select the results grouped by team and ordered by points with a ranking per team. With that sub query you simply select the top 4 record to give you the results.

I can think of 2 other methods of achieving this in TSQL bit the above key word should give you the pointers for research.
Never underestimate the power of human stupidity
RAH

AnswerRe: Grouped ordered precise select statement? Pin
Blue_Boy5-Oct-10 21:21
Blue_Boy5-Oct-10 21:21 
QuestionUsing OPENXML in stored Procedure Pin
meeram3955-Oct-10 1:26
meeram3955-Oct-10 1:26 
AnswerRe: Using OPENXML in stored Procedure Pin
Goutam Patra5-Oct-10 2:38
professionalGoutam Patra5-Oct-10 2:38 
QuestionNumber of Records [modified] Pin
T.RATHA KRISHNAN5-Oct-10 1:15
T.RATHA KRISHNAN5-Oct-10 1:15 
AnswerRe: Number of Records Pin
NeverHeardOfMe5-Oct-10 1:26
NeverHeardOfMe5-Oct-10 1:26 
GeneralRe: Number of Records Pin
T.RATHA KRISHNAN5-Oct-10 1:48
T.RATHA KRISHNAN5-Oct-10 1:48 
GeneralRe: Number of Records Pin
NeverHeardOfMe5-Oct-10 1:52
NeverHeardOfMe5-Oct-10 1:52 
GeneralRe: Number of Records Pin
T.RATHA KRISHNAN5-Oct-10 2:04
T.RATHA KRISHNAN5-Oct-10 2:04 
GeneralRe: Number of Records Pin
NeverHeardOfMe5-Oct-10 2:14
NeverHeardOfMe5-Oct-10 2:14 
GeneralRe: Number of Records Pin
T.RATHA KRISHNAN5-Oct-10 2:21
T.RATHA KRISHNAN5-Oct-10 2:21 
QuestionAdding new data in two tables [modified] Pin
Erdinc274-Oct-10 23:05
Erdinc274-Oct-10 23:05 
AnswerRe: Adding new data in two tables Pin
Gerben Jongerius4-Oct-10 23:39
Gerben Jongerius4-Oct-10 23:39 
GeneralRe: Adding new data in two tables Pin
Erdinc274-Oct-10 23:58
Erdinc274-Oct-10 23:58 
GeneralRe: Adding new data in two tables Pin
Mycroft Holmes5-Oct-10 0:25
professionalMycroft Holmes5-Oct-10 0:25 
GeneralRe: Adding new data in two tables Pin
Erdinc275-Oct-10 1:27
Erdinc275-Oct-10 1:27 
QuestionDeploying Reports for Reporting Services Pin
dwolver4-Oct-10 9:38
dwolver4-Oct-10 9:38 
NewsConcatenate two or more rows single string in SQL Pin
Sunasara Imdadhusen4-Oct-10 3:17
professionalSunasara Imdadhusen4-Oct-10 3:17 

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.