• I ran this script against one of my tables which does not have an identity column and seemed to do okay but with a couple of problems that I think are unrelated to the lack of an identity column.

    The problem is that Sql Server complains abou the syntax of the word "NULL" after the field names in three places, like so:

    CREATE PROCEDURE InsUpd_ChopDates

    @Chop_Date date

    NULL

    INSERT INTO dbo.ChopDates (

    Chop_Date

    )

    VALUES (

    @Chop_Date

    NULL

    UPDATE dbo.ChopDates SET

    Chop_Date = @Chop_Date

    NULL

    In order to get it to work in my test I had to delete the word "NULL" in all three places, add an "AS" keyword and close the parentheses on Values.

    Shouldn't these be separate procedures? Why both in one? It looks like it will always add and always update. Or is this just to get you going, and you will just split the code up into two procedures?

    I'm a major newbie, so many thanks.

    "What I lack in youth I make up for in immaturity!"
    Please visit my music site at http://woundedego.com