CREATE PROCEDURE TSShwRelPrts @ParticipantId bigint AS BEGIN select gp.pname,gp.ParticipantId,gp.relatedpid,gp.RecommanderId,p.pname as
recom,gp.username,i.allowselect,r.RelationshipId,r.Relname from tsparticipants as p inner join (select
p.username,p.pname,g.ParticipantId,g.relatedpid,g.RecommanderId,g.Relationshipid
from TSGroupParticipants as g inner join tsparticipants as p on g.relatedpid=p.ParticipantId where g.ParticipantId=@ParticipantId) as gp
on gp.RecommanderId=p.ParticipantId -------> here i need rows which doesn t match also
inner join TSMailinvitation as i on gp.ParticipantId=i.ParticipantId inner join TSRelationships as r on r.Relationshipid=gp.Relationshipid END
|
| Author: Neetu 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
try this. gp.RecommanderId=p.ParticipantId or gp.RecommanderId<>p.ParticipantId
regards Neetu
|
| Author: Anil Kumar Pandey 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
change the condition or better to remove the condition if you want to see all row..
Thanks & Regards Anil Kumar Pandey
|
| Author: Mohan 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Remove that condition and check.
Regards
Mohan Kumar.D
|
| Author: anbu 03 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
if i remove the condition its shows error
|
| Author: atulpatel 03 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Use OUTER JOIN instead of INNER JOIN.
Thanks, Atul
|