RE: Problem with Stored Procedure

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Sean B (anonymous_at_discussions.microsoft.com)
Date: 04/23/04


Date: Fri, 23 Apr 2004 09:36:08 -0700

IF EXISTS(SELECT NULL FROM tbl WHERE ...=@Param
   --UPDATE
ELSE
  --INSERT
     
     ----- Sarah wrote: -----
     
     Hi,
     
     I am trying to write a stored procedure with parameters that will insert if
     the record does not exist and update the record if it does exist. Can
     someone help me with this?
     
     Thanks