C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » SQL Server »

Pls chk arrow marks in this sp


Posted Date: 03 Nov 2009      Posted By: anbu      Member Level: Gold     Points: 1   Responses: 5



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





Responses

Author: Neetu    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

try this.
gp.RecommanderId=p.ParticipantId or gp.RecommanderId<>p.ParticipantId


regards
Neetu



Author: Anil Kumar Pandey    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     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 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Remove that condition and check.

Regards

Mohan Kumar.D



Author: anbu    03 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

if i remove the condition its shows
error



Author: atulpatel    03 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Use OUTER JOIN instead of INNER JOIN.


Thanks,
Atul



Post Reply
You must Sign In to post a response.
Next : Executing
Previous : Can not login to sql server using sql browser
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use