• Hi, on a similar note, I want to make a stored procedure where I can delete customers from a December customer table, but only those who will show up again in January. Keep those who are not returning, and insert the existing and new customers from January. In other word, I am trying to update a customer table every month by deleting the old and replace/insert the new.

    Something like:

    delete from AccountMaster

    where AccountMaster.AccountID in (select AccountID from RevDec2010)

    insert into AccountMaster (AccountID,Period)

    select distinct AccountID, Period

    from RevJan2011

    How can I declare the table object "RevDec2010" and so forth in the stored procedure?

    Thank you very very much in advance!!