Martin Honnen led me on the way to the solution to my problem in his answer in this thread over at the MSDN forums. To get NULL returned by the. This way I could make the. For the XML parser to understand that the xsi: prefix matches with the XMLSchema-instance name space we need to declare this namespace before we can execute the query.
You can do this using the "with xmlnamespaces" clause. Here is the same example but now adapted with this new knowledge to retrieve a null value from the XML document:. And the best thing is that this works identical for any type specified. Log in or register to rate. Join the discussion and add your comment. Missing data is a difficult and common problem to solve. In this article, Joe Celko explains several approaches to deleting or replacing missing data. It sounds simple enough. Either your column will always have a value or it may not.
Yet somehow such a seemingly simple decision can become a never-ending debate where database schema begins to resemble superstition and designing effective tables seems more contentious than you expected it to be. For example the cast below will cause entitization, but the convert will not. Not just the element names, but even the shape can change. Would that help?
If you don't have the passion to help people, you have no passion yosiasz Master Smack Fu Yak Hacker Posts Posted - : what version of SQL do you have and do you have the latest patches and SP of everything?
Because I ran everything on my machine which is sql R2 and it works fine? If you don't have the passion to help people, you have no passion Scal Starting Member 24 Posts Posted - : Hi yosiasz; sorry for the late reply, been busy on plenty of things.
I ran into another problem. Argument2 is " " white space , but for some reason, SQL returns it as "" empty although I don't "trim" the column value. Why doesn't SQL keep data as they are? Subscribe to SQLTeam. Home Weblogs Forums. May 4, May 4, April 27, April 27, April 22, April 22, I am very passionate about SQL Server. Please feel free to drop me any question online or offline, I will try to give you the best possible answer from my side.
I have an experience of just 2.
0コメント