Forum Replies Created

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

  • RE: FOR XML child nodes depend on column value

    Thanks very much Mark.

    I got close but had the case END in the wrong place

    CASE LineType WHEN 1 THEN (StockCode as [StockLine/StockCode])

    ELSE (Comment as [CommentLine/Comment]) END,

    Your's works perfectly!:-):-)

  • RE: FOR XML child nodes depend on column value

    Hope this is in order.

    --Create 2 tables OrderHeaders and OrderDetails

    /****** Object: Table [dbo].[OrderHeaders] Script Date: 11/24/2011 14:23:10 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[OrderHeaders](

    [OrderID]...

  • RE: FOR XML child nodes depend on column value

    Thanks for your reply. Yes I can post some data. What format would you like it in?

    The extract that I posted as the desired result are in fact a...

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