>I want to write a stored procedure, and pass it several parameters. One of the parameters would be if it is an update or new record. Can I write a stored procedure that:
>
>if @tiAction=1
> * Code to Update
>else
> * Code to insert
>
>
>
>Thanks
>Kirk
Yes you can.
...
if @tiAction=1
BEGIN
* Code to Update
...
END
else
BEGIN
* Code to insert
...
END
--sb--