How do I add a column to one dataset from another?

  • remove the extra quotes from the xml if there are some, replace for the scape code for xml, i dont remember the code, but, that should work. there are some at the inch numbers for disk size.

    regards.

  • PEPEPACO_1980 (7/6/2009)


    remove the extra quotes from the xml if there are some, replace for the scape code for xml, i dont remember the code, but, that should work. there are some at the inch numbers for disk size.

    regards.

    What do you mean "replace for the scape code for xml"?

  • removed the quotes, still no luck.

  • Would you be willing to connect to my machine via netmeeting so we could figure out what is wrong?

  • This web site has a history of mucking up xml text. I suggest that you attach a file with your xml code in it - save it as a .txt file and use the "Edit Attachments" button at the bottom of the message composer dialog screen to attach it to this message.

    Some of the problems is that some browsers change the case of the xml elements to upper code, while other browsers change it to lower case. Since XML is case sensitive, it can easily throw everyone off.

    Note that they are working on the problem, but for now this is your best bet. Give it a try.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • If you go back to the original post, and press the quote button, you well see that the element are in mixed case. Your browser may display them as upper or lower case... this is a glitch with the code windows on this web site.

    So, this code posted previously:

    select Tbl.C.value('@name', 'nvarchar(50)') as [name] ,

    Tbl.C.value('@val', 'nvarchar(50)') as val,

    Tbl.C.value('@count', 'nvarchar(50)')as [count],

    (select Tbl.C.value('@rsid', 'nvarchar(50)')as rsid

    from @FileContents2.nodes('/solution/specifications/sessiondata') AS Tbl(C) ) as rsid

    from @FileContents2.nodes('/solution/results/financialresults/modelstotal/product') AS Tbl(C)

    will always return zero rows. Because it should be "nodes('/Solution/Specifications/SessionData')" and "nodes('Solution/Results/FinancialResults/ModelsTotal/Product')". And "value('@Name')", "value('@Val')", "value('@Count')" and "value('@RSID')"

    However, if you change the case of the elements referenced in the nodes(), and the element names prefixed by a @ to match what is in your file, I think this may work for you. XML is case sensitive, and this alone may fix your issue.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Thank You! That fixed it. This is a super forum.

  • im glad it works for you!

    regards.

Viewing 8 posts - 31 through 37 (of 37 total)

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