Another problem w/ NULL values in XML

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Art (Art_at_discussions.microsoft.com)
Date: 09/28/04

  • Next message: Aaron Prohaska: "Copying real datatype to decimal"
    Date: Tue, 28 Sep 2004 14:01:03 -0700
    
    

    We want to convert NULL columns returned in a query to value of 0 when using
    it w/ FOR XML AUTO. We used CASE statement to select NULL values and convert
    them to 0. This worked fine until the query actually encountered actual
    value. Now all the ones that were NULLs get converted to 0 but the one which
    had a value and should have not been touched disappeared alltogheter from the
    XML document.
    WTF?? Any suggestions?
    Art


  • Next message: Aaron Prohaska: "Copying real datatype to decimal"

    Relevant Pages

    • Creating correct XML output?
      ... I'm running a SELECT query (consisting of UNIONS) with FOR XML AUTO ... I cannot get away from running the query as a string since it is built ...
      (microsoft.public.sqlserver.xml)
    • How to get XML from SQL Server
      ... SELECT field0, ..., fieldN FROM mytable where FOR XML AUTO ... I use a TAdoQuery to get back result, and I get only a field with a blob ... Now I want to read the contents of the blob field, ... This is how appears in the Microsoft Query Analyzer ...
      (borland.public.delphi.database.ado)
    • Re: Query problem ...
      ... The problem is that i have many joins on this query, ... It's a mess because I cannot figure out how to predict how the XML AUTO will ... because I'm using BizTalk 2004 I cannot ... Or would that remove duplicates that you want to have ...
      (microsoft.public.sqlserver.xml)
    • WriteXML encoding strings ! Please help
      ... I fill a dataset in asp.net with a 'FOR XML AUTO' query and Output it ... back to the browser. ... means that the script that I am using can't recognise the first node. ...
      (microsoft.public.dotnet.xml)
    • Using XPath to copy nodes
      ... private Element getAnswers(Element root, String queID) throws ... XPath xpath = factory.newXPath; ... //Design the query to search through the XML Document ...
      (comp.lang.java.programmer)