Forum Replies Created

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

  • RE: Update in outer Apply

    Does this help?

    CREATE TABLE [dbo].[OrderItems_tbl](

    [OrderItemId] [int] IDENTITY(1,1) NOT NULL,

    [OrderId] [int] NULL,

    [ProductId] [int] NULL,

    [Quantity] [int] NULL,

    CONSTRAINT [PK_OrderItems_tbl] PRIMARY KEY CLUSTERED

    (

    [OrderItemId] ASC

    )

    )

    GO

    INSERT INTO OrderItems_tbl (OrderId, ProductId, Quantity) VALUES (1,1,7),(1,2,5)

    -------------------------------------------------------------------------

    CREATE...

  • RE: Update in outer Apply

    Thanks for replying GilaMonster,

    I'm trying to update suppliers stock for each OrderItem row without using a cursor.

    I have a table that im trying to write an update query that...

  • RE: Insert into multiple tables

    cheers for the reply, I will take a look at OUTPUT clause,

    I'm not sure, I'm just looking for the most efficient way, would it be quicker to do a bulk...

  • RE: Need A More Efficient Way

    Hi djj,

    Thanks for replying, after looking at my code again this morning i've manage to trim it down. But you gave me an idea by using the ISNULL(PP.GroupID, '') =...

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