• also note you cannot have a GO statement inside your IF statements BEGIN /END block...

    your example for part one would not be valid, it would have to be like this:

    IF EXISTS(SELECT 1 FROM [ReorderS]) --what is your condition?

    BEGIN

    DELETE FROM [ReorderS]

    INSERT INTO [ReorderS]

    SELECT ITEM,NULL FROM [INV_ITEM_MAS]

    UPDATE [ReorderS] SET Quantity = [PO_Qty]

    FROM [PO ITEM INTERFACE] INNER JOIN [INV_ITEM_MAS]

    ON [PO ITEM INTERFACE].[PO_Item]= [ReorderS].ITEM

    END

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!