Click here to Skip to main content
15,891,136 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to build this partial SUM... Pin
dasblinkenlight5-Jun-11 7:08
dasblinkenlight5-Jun-11 7:08 
GeneralRe: How to build this partial SUM... Pin
J4amieC6-Jun-11 6:19
J4amieC6-Jun-11 6:19 
GeneralRe: How to build this partial SUM... Pin
dasblinkenlight6-Jun-11 6:38
dasblinkenlight6-Jun-11 6:38 
QuestionTop 1 distinct or something like that Pin
Paul E Davies2-Jun-11 23:21
Paul E Davies2-Jun-11 23:21 
AnswerRe: Top 1 distinct or something like that Pin
Blue_Boy2-Jun-11 23:49
Blue_Boy2-Jun-11 23:49 
GeneralRe: Top 1 distinct or something like that Pin
Paul E Davies3-Jun-11 0:44
Paul E Davies3-Jun-11 0:44 
GeneralRe: Top 1 distinct or something like that Pin
Blue_Boy3-Jun-11 1:06
Blue_Boy3-Jun-11 1:06 
AnswerRe: Top 1 distinct or something like that Pin
dasblinkenlight3-Jun-11 1:20
dasblinkenlight3-Jun-11 1:20 
What I'd like to do is get the top 1 details for each typeid

How do you know that a particular detail is 'top' among its peer details? Does picking a particular item matter at all? If it does not matter which row you pick as your 'top', try this:
SQL
select typeid, min(details) from auditlog group by typeid
it will decide that a detail is 'top' if its description comes first alphabetically.

If this is not what you need, you would have to provide another column to determine which detail among many possibilities for the same typeid is to be selected.
GeneralRe: Top 1 distinct or something like that Pin
David Mujica3-Jun-11 2:43
David Mujica3-Jun-11 2:43 
GeneralRe: Top 1 distinct or something like that Pin
Paul E Davies3-Jun-11 3:33
Paul E Davies3-Jun-11 3:33 
AnswerRe: Top 1 distinct or something like that Pin
Simon_Whale3-Jun-11 1:32
Simon_Whale3-Jun-11 1:32 
QuestionSQL Server: One connection vs Connection Per Client Pin
Eli Nurman2-Jun-11 5:59
Eli Nurman2-Jun-11 5:59 
AnswerRe: SQL Server: One connection vs Connection Per Client Pin
David Mujica2-Jun-11 6:14
David Mujica2-Jun-11 6:14 
AnswerRe: SQL Server: One connection vs Connection Per Client Pin
jschell2-Jun-11 9:48
jschell2-Jun-11 9:48 
QuestionDistinct + Count Pin
JP_Rocks1-Jun-11 23:51
JP_Rocks1-Jun-11 23:51 
AnswerRe: Distinct + Count Pin
Ravi Sant1-Jun-11 23:56
Ravi Sant1-Jun-11 23:56 
GeneralRe: Distinct + Count Pin
JP_Rocks2-Jun-11 0:03
JP_Rocks2-Jun-11 0:03 
GeneralRe: Distinct + Count Pin
JP_Rocks2-Jun-11 0:07
JP_Rocks2-Jun-11 0:07 
GeneralRe: Distinct + Count Pin
Blue_Boy2-Jun-11 1:54
Blue_Boy2-Jun-11 1:54 
GeneralRe: Distinct + Count Pin
SilimSayo2-Jun-11 2:30
SilimSayo2-Jun-11 2:30 
Questionsql server hangs with multi queries Pin
Eli Nurman1-Jun-11 20:26
Eli Nurman1-Jun-11 20:26 
AnswerRe: sql server hangs with multi queries Pin
jschell2-Jun-11 9:50
jschell2-Jun-11 9:50 
GeneralRe: sql server hangs with multi queries Pin
Eli Nurman2-Jun-11 9:58
Eli Nurman2-Jun-11 9:58 
GeneralRe: sql server hangs with multi queries Pin
jschell3-Jun-11 8:15
jschell3-Jun-11 8:15 
QuestionSQL SERVER Training Videos.. Pin
siva4551-Jun-11 19:48
siva4551-Jun-11 19:48 

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.