Forum Replies Created

Viewing 15 posts - 3,901 through 3,915 (of 5,504 total)

  • RE: Importing XML through SSIS

    Slick84 (3/25/2010)


    ...Lutz,

    In your query like below:

    DECLARE @xml XML

    SET @xml = (SELECT * FROM OPENROWSET(BULK 'c:\filepath\variablefileName', SINGLE_BLOB) AS x)

    Can I somehow use a variable filename? This is because my filename...

  • RE: Challenging XQUERY With Final Pivot

    Hi Matt,

    I'd use XQuery instead of OPENXML in combination with PIVOT and UNPIVOT.

    Something like the following:

    DECLARE @xml XML

    SET @xml='<ADKMessage>

    <c n="totalmb" tn="3" t="1269017107034">

    <v>139390.0</v>

    <v>571133.0</v>

    </c>

    <c n="name" tn="1" t="1269017107034" kc="true">

    <v>C:</v>

    <v>D:</v>

    </c>

    <c n="freemb" tn="3" t="1269017107034">

    <v>57649.14453125</v>

    <v>516178.40625</v>

    </c>

    <c n="usedmb"...

  • RE: Importing XML through SSIS

    Thanx Wayne for taking over.

    I've been busy in between so I couldn't follow up for a while...

    @Slick: Glad it worked. 😀

    Sometimes it's easier to rely on T-SQL including some new...

  • RE: Convert Row values to Columns

    If the values for field2 are fixed (0, 10, 20, 30), then you could either use PIVOT (see BOL for details) or DynamicCrossTab (see the related link in my signature).

    If...

  • RE: Importing XML through SSIS

    Here's a sample code to populate three tables. Let me know if it helps and/or if you need any further assistance.

    DECLARE @xml XML

    SET @xml=(SELECT * FROM OPENROWSET(

    BULK...

  • RE: Importing XML through SSIS

    Let's see what we can do...

    Do you have to use SSIS or would a T-SQL / XQuery solution work for you, too?

    If the latter, please provide a (valid) XML snippet...

  • Viewing 15 posts - 3,901 through 3,915 (of 5,504 total)