delete multiple rows

  • Hi All,

    I'm building a table which tracks the events that happen to items through a warehouse. Each item has a ref no called a CCU. What i'm trying to do is delete all the CCUs in my table that had an events happen to it yesterday.

    So.....

    I've created a statement that selects all distinct CCUs no's from my events table for yesterday. I now need to delete these CCUs from my table.

    How do i go about this?? as you can tell i'm fairly new to writing tsql.

    Thanks, Spin.

  • Please post table definitions, sample data and expected results as per http://www.sqlservercentral.com/articles/Best+Practices/61537/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply