This is my first post to this website.
Here is my question: I want to use the same stored procedure for Insert and Update.
For Insert there is no problem. But at the time of update O want to update it based on my primary key, not on any unique column value.
Here is my current Procedure.
IF EXISTS(SELECT MemberID FROM MEMBER WHERE MEMBERSHIPNO=@MEMBERSHIPNO)
WHERE MEMBERSHIPNO=@Membershipno
I want to use WHERE MemberID=@MemberID //Memberid is primary key
Please Help.
I’m not sure if I understand you’re question quite clearly, but from what I understand you’re trying to do a IF clause that would UPDATE if said credentials exists.
Something like this would do the trick, just fill in the logic and it should all work out.
Hope this helps.