I have 3 tables:
Messagetable havingMsgID,MsgText,MsgDatecolumns.MsgIdis PK.MessageSendertable havingMsgId,SenderId,SenderName.MsgIdis FK.MessageTotable havingMsgId,ToId,ToName.MsgIdis FK.
Every Message will have one Sender. But it can have many Recipients. i.e. For every record in the Message table, there will be one record in MessageSender table and more than one records in the MessageTo table.
I want to get ALL details of the all Messages in one query or at a time. e.g. for a specific Message, who is the Sender and who ALL are recipients.
How can I do this?
I am using MSSQL Server 2005 and Sybase 15.
Note: I have given only relevant details of the tables here. And I cannot change table schema since it's been there in production for a long time.