Click here to Skip to main content
15,901,035 members
Home / Discussions / Database
   

Database

 
Questionhelping writing sql query Pin
michaelgr120-Sep-10 2:49
michaelgr120-Sep-10 2:49 
AnswerRe: helping writing sql query [modified] Pin
Blue_Boy20-Sep-10 3:07
Blue_Boy20-Sep-10 3:07 
AnswerRe: helping writing sql query Pin
PIEBALDconsult20-Sep-10 3:18
mvePIEBALDconsult20-Sep-10 3:18 
GeneralRe: helping writing sql query Pin
michaelgr120-Sep-10 3:21
michaelgr120-Sep-10 3:21 
AnswerRe: helping writing sql query Pin
Pete O'Hanlon20-Sep-10 6:47
mvePete O'Hanlon20-Sep-10 6:47 
AnswerRe: helping writing sql query Pin
RyanEK20-Sep-10 17:40
RyanEK20-Sep-10 17:40 
GeneralRe: helping writing sql query Pin
Mycroft Holmes20-Sep-10 21:05
professionalMycroft Holmes20-Sep-10 21:05 
AnswerRe: helping writing sql query Pin
i.j.russell20-Sep-10 21:18
i.j.russell20-Sep-10 21:18 
I find using STUFF to be slightly easier to read;

SELECT class,
  STUFF(
    (
    SELECT
      ',' + name
    FROM @tmp t2
    WHERE t2.class = t1.class
    FOR XML PATH('')
    ), 1, 1, '') AS data
FROM @tmp t1
GROUP BY class

GeneralRe: helping writing sql query Pin
Mycroft Holmes21-Sep-10 3:49
professionalMycroft Holmes21-Sep-10 3:49 
Questioncomplex sql query Pin
abhi29198418-Sep-10 12:20
abhi29198418-Sep-10 12:20 
AnswerRe: complex sql query Pin
Andy_L_J18-Sep-10 13:07
Andy_L_J18-Sep-10 13:07 
AnswerRe: complex sql query Pin
Mycroft Holmes18-Sep-10 13:35
professionalMycroft Holmes18-Sep-10 13:35 
AnswerRe: complex sql query Pin
abhi29198419-Sep-10 0:23
abhi29198419-Sep-10 0:23 
GeneralRe: complex sql query Pin
Mycroft Holmes19-Sep-10 3:08
professionalMycroft Holmes19-Sep-10 3:08 
GeneralRe: complex sql query Pin
abhi29198419-Sep-10 4:45
abhi29198419-Sep-10 4:45 
GeneralRe: complex sql query Pin
abhi29198419-Sep-10 5:46
abhi29198419-Sep-10 5:46 
QuestionINNER, OUTER, LEFT, RIGHT JOINs- totally confused. Pin
lemarshall18-Sep-10 6:57
lemarshall18-Sep-10 6:57 
AnswerRe: INNER, OUTER, LEFT, RIGHT JOINs- totally confused. Pin
Mycroft Holmes18-Sep-10 13:32
professionalMycroft Holmes18-Sep-10 13:32 
GeneralRe: INNER, OUTER, LEFT, RIGHT JOINs- totally confused. Pin
lemarshall19-Sep-10 12:37
lemarshall19-Sep-10 12:37 
GeneralRe: INNER, OUTER, LEFT, RIGHT JOINs- totally confused. Pin
Mycroft Holmes19-Sep-10 12:44
professionalMycroft Holmes19-Sep-10 12:44 
QuestionSql queries on unicode data [modified] Pin
shiva.kore17-Sep-10 21:19
shiva.kore17-Sep-10 21:19 
AnswerRe: Sql queries on unicode data Pin
Rob Smiley17-Sep-10 23:57
Rob Smiley17-Sep-10 23:57 
GeneralRe: Sql queries on unicode data Pin
shiva.kore19-Sep-10 19:07
shiva.kore19-Sep-10 19:07 
QuestionOrdered selection of 2 columns in single SQL query Pin
Emmet_Brown17-Sep-10 19:44
Emmet_Brown17-Sep-10 19:44 
AnswerRe: Ordered selection of 2 columns in single SQL query Pin
i.j.russell17-Sep-10 22:35
i.j.russell17-Sep-10 22:35 

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.