Click here to Skip to main content
15,796,984 members
Home / Discussions / Database
   

Database

 
GeneralRe: SSIS Configurations Pin
Mycroft Holmes22-Jul-08 17:11
professionalMycroft Holmes22-Jul-08 17:11 
QuestionNot able to call dll through PL /SQL Pin
Neeraj Sinha22-Jul-08 0:23
Neeraj Sinha22-Jul-08 0:23 
AnswerRe: Not able to call dll through PL /SQL Pin
Mike Dimmick22-Jul-08 4:44
Mike Dimmick22-Jul-08 4:44 
AnswerRe: Not able to call dll through PL /SQL Pin
Wendelius22-Jul-08 7:15
mentorWendelius22-Jul-08 7:15 
Questionquerying all items... the best method? [modified] Pin
gethomast21-Jul-08 23:56
gethomast21-Jul-08 23:56 
AnswerRe: querying all items... the best method? Pin
Mycroft Holmes22-Jul-08 1:01
professionalMycroft Holmes22-Jul-08 1:01 
GeneralRe: querying all items... the best method? [modified] Pin
gethomast22-Jul-08 1:42
gethomast22-Jul-08 1:42 
AnswerRe: querying all items... the best method? Pin
leoinfo22-Jul-08 3:48
leoinfo22-Jul-08 3:48 
( You are using SQL2005, right? Smile | :) )

Try this:

;WITH RecipientsByMail (MailId, RecipientList) AS (
    select mx.Id AS MailId , 
        (   select AddressTable.Name+','
            from MailTable
            join RecipientTable on RecipientTable.MailTableId = MailTable.Id
            join AddressTable   on AddressTable.Id = RecipientTable.AddressTableId
            WHERE MailTable.Id = mx.Id
            FOR XML PATH('')
        ) AS RecipientList 
    from MailTable as mx
)
select m.Id, m.Created, m.Subject, sender.Name, r.RecipientList
from MailTable as m
join SenderTable as s on s.MailTableId = m.Id
join AddressTable as sender on sender.Id = s.AddressTableId
join RecipientsByMail as r on r.MailId = m.Id ;


Please... SAVE my time by rating the posts that you read!

There are 10 kinds of people in the world: those who understand binary and those who don't.

GeneralRe: querying all items... the best method? Pin
Mycroft Holmes22-Jul-08 4:54
professionalMycroft Holmes22-Jul-08 4:54 
GeneralRe: querying all items... the best method? Pin
leoinfo22-Jul-08 9:54
leoinfo22-Jul-08 9:54 
GeneralRe: querying all items... the best method? Pin
Mycroft Holmes22-Jul-08 15:45
professionalMycroft Holmes22-Jul-08 15:45 
GeneralRe: querying all items... the best method? Pin
Mycroft Holmes22-Jul-08 17:24
professionalMycroft Holmes22-Jul-08 17:24 
Questionretreving the gridview row in color from sqlserver using boundfields Pin
santosh04221-Jul-08 19:54
santosh04221-Jul-08 19:54 
AnswerRe: retreving the gridview row in color from sqlserver using boundfields Pin
Mycroft Holmes21-Jul-08 20:57
professionalMycroft Holmes21-Jul-08 20:57 
QuestionFunction returning a table Pin
Kushi Bobby21-Jul-08 19:49
Kushi Bobby21-Jul-08 19:49 
AnswerRe: Function returning a table Pin
Mycroft Holmes21-Jul-08 21:01
professionalMycroft Holmes21-Jul-08 21:01 
QuestionBackup Database And Move Stored Procedures Pin
mehrnoosh21-Jul-08 19:18
mehrnoosh21-Jul-08 19:18 
AnswerRe: Backup Database And Move Stored Procedures Pin
John_Adams21-Jul-08 20:44
John_Adams21-Jul-08 20:44 
GeneralRe: Backup Database And Move Stored Procedures Pin
mehrnoosh22-Jul-08 20:25
mehrnoosh22-Jul-08 20:25 
Generalneed to layout the database [modified] Pin
keyboard warrior21-Jul-08 14:06
keyboard warrior21-Jul-08 14:06 
QuestionRe: need to layout the database Pin
Paul Conrad21-Jul-08 14:14
professionalPaul Conrad21-Jul-08 14:14 
AnswerRe: need to layout the database Pin
keyboard warrior21-Jul-08 15:16
keyboard warrior21-Jul-08 15:16 
QuestionRe: need to layout the database Pin
Paul Conrad21-Jul-08 15:27
professionalPaul Conrad21-Jul-08 15:27 
AnswerRe: need to layout the database Pin
keyboard warrior21-Jul-08 15:31
keyboard warrior21-Jul-08 15:31 
GeneralRe: need to layout the database Pin
User 171649221-Jul-08 14:18
professionalUser 171649221-Jul-08 14:18 

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.