Forum Replies Created

Viewing 15 posts - 1,906 through 1,920 (of 5,504 total)

  • RE: OPENXML issue

    Rich Yarger (2/15/2011)


    Blaaaaaaaaaaaaaaaaaaaaaaaaaaah. . .Columns - not data. 🙁

    DECLARE @XML xml;

    SET @XML ='

    <Root>

    <Customer ID="1" FirstName="John" LastName="Doe" Street="123, Fake Street" City="Anytown" State="NY" Zip="11280" HomePhone="555-123-4567"

    ...

    </Transactions>

    </Checking>

    </Accounts>

    </Customer>

    </Root>'

    SELECT

    ...

  • RE: OPENXML issue

    Rich Yarger (2/15/2011)


    ...

    And that is why I am a newbie!

    Thanks again Lutz!

    😉

    You're welcome. 🙂

    (I just got a little confused since you used it correctly before... I didn't wanted to come...

  • RE: OPENXML issue

    Rich Yarger (2/15/2011)


    Hey gang - thank you again!

    Just one last thing...

    My DECLARE and SET up at the top of the XML data should be. . .???

    ... like the example Mister...

  • RE: OPENXML issue

    Craig Farrell (2/15/2011)


    Hey Lutz and Magoo?

    I'll admit my XQuery is very weak. One of the things that's always confused me is this part:

    FROM

    @XML.nodes ('/ROOT/Customer') as cust(cn)

    cross apply...

  • RE: OPENXML issue

    MM

    using your very fine example I'd suggest using CROSS APPLY instead of "climbing up" the nodes level.

    Just compare execution plan and query statistics... (on a larger set of data, of...

  • RE: Redundant Indexes

    Craig Farrell (2/15/2011)


    LutzM (2/15/2011)


    GilaMonster (2/15/2011)


    In your example index 1 is redundant (the columns match exactly a left-based subset of another index), index 2 is not.

    Wouldn't index 1 be used if...

  • RE: Redundant Indexes

    GilaMonster (2/15/2011)


    In your example index 1 is redundant (the columns match exactly a left-based subset of another index), index 2 is not.

    Wouldn't index 1 be used if a query would...

  • RE: IN with LIKE?

    krushkoder (2/15/2011)


    Thanks Lutz!

    See, I knew it was simple!

    Many Thanks!

    KK

    Please read my reply completely.

    The query I posted may perform really bad. Hence my advice to add the computed column.

  • RE: IN with LIKE?

    You could use

    SELECT *

    FROM table_A A

    INNER JOIN table_B B

    ON B.StkNumber LIKE '%'+A.StkNumber

    However, this will cause a table scan since there is no index the query...

  • RE: In what circumstances are there no other option than to use cursors?

    GSquared (2/15/2011)


    Any place where you need to dynamically run against objects in the database or server, or call a stored procedure over and over vs a dataset, when the results...

  • RE: Crosstab query in SQL 2000

    Bad news first: No, there is no wizard.

    Now the good news: please have a look at the CrossTab article referenced in my signature. It'll show you how to do it...

  • RE: Can you please help me

    did you try a google search?

    The keywords "restore from TDE database backup" returned several useful links, including this one.

    SSC - your Simple Search Community.

  • RE: Are the posted questions getting worse?

    Dave Ballantyne (2/15/2011)


    Big meeting on friday to best decide how to handover all my knowledge to co-workers.

    First big change i need to do today is was told to make the...

  • RE: delete help using output.deleted option in sql

    praveensc2003 (2/15/2011)


    Hi

    i am not able solve this problem. can any body guide how to solve this. send me sample script.

    thanks

    It's hard for us to provide you a script that would...

  • RE: OPENXML issue

    Something like this?

    SELECT

    customer.value ('@CustomerID', 'int') AS CustomerID,

    customer.value ('@FirstName', 'nvarchar(20)') AS CustomerFirstName,

    ...

Viewing 15 posts - 1,906 through 1,920 (of 5,504 total)