Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gousia
Starting Member
3 Posts |
Posted - 2008-04-11 : 12:13:55
|
Hi There,Could You please look into this and help me to obtain the more appropriate solutionLets assume that we have two tables with one to many relationship.one table contains employee's and the other contains communication made by employee to the clients. An employee might have communicated to the client one or more times or may not have communicated at all.(Employee -> Communication = one ->many)I m trying to write a query which display all the records of employee's and their respective communication text with out repetition of the employee id or employee name. I need the records with null communication as well.Ex :Table 1 -Empid(Pk) Empname1 Sam2 John3 RamTable 2 -Comid(Pk) Empid(Fk) Comtext 1 1 Hello 2 1 Hi 3 2 How are you4 1 Thanks5 2 FineResult required -Empid EmpName Commtext 1 Sam Hello,Hi,Thanks2 John How are you, Fine3 Ram Any help will be much appreciated.Many Thanks,G Ps : The above ex is just an example. don;t look at it logically :) |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-11 : 12:42:26
|
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53293 |
 |
|
gousia
Starting Member
3 Posts |
Posted - 2008-04-16 : 17:10:55
|
quote: Originally posted by visakh16 http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53293
Hi Visakh,Many Thanks for your help. You are a Star!Cheers,G |
 |
|
|
|
|