Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

XML Expand / Collapse
Author
Message
Posted Monday, June 15, 2009 11:34 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, July 23, 2013 6:34 AM
Points: 654, Visits: 265
Comments posted to this topic are about the item XML
Post #735464
Posted Tuesday, June 16, 2009 7:11 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, May 9, 2014 12:47 AM
Points: 3,448, Visits: 4,407
It cannot be used as a parameter to any scalar, built-in functions other than ISNULL, COALESCE, and DATALENGTH

What about CAST/CONVERT? These functions are scalar, built-in; XML data type can be used as a parameter to these functions. So I guess that the third statement of QotD is not correct.
Post #735626
Posted Tuesday, June 16, 2009 9:37 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 28, 2014 6:38 AM
Points: 1,182, Visits: 1,972
The System Functions are classified as Scalar Functions.
Reference BOL:
Scalar Functions: http://technet.microsoft.com/en-us/library/ms174318(SQL.90).aspx
System Functions: http://technet.microsoft.com/en-us/library/ms187786(SQL.90).aspx

Using a System Function such as CAST and CONVERT against an xml data type is permitted. Ref:
http://technet.microsoft.com/en-us/library/ms189887(SQL.90).aspx

Therefore, the BOL entry referenced by the answer is incorrect. Since the documentation is conflicting but certain scalar operations are permitted, the provided answer is incorrect.



(PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.
Post #735789
Posted Sunday, July 5, 2009 6:31 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
You know these multi-select questions are much more difficult than the multiple choice ones. I think that they should always be worth at least two points.

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #747458
Posted Friday, December 11, 2009 4:11 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, January 11, 2013 12:41 PM
Points: 621, Visits: 297
Pure guess work - I am never used XML datatype



Bhavesh Patel

http://bhaveshgpatel.wordpress.com/
Post #832811
Posted Saturday, March 20, 2010 12:34 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 7:14 AM
Points: 8,739, Visits: 9,286
vk-kirov (6/16/2009)
It cannot be used as a parameter to any scalar, built-in functions other than ISNULL, COALESCE, and DATALENGTH

What about CAST/CONVERT? These functions are scalar, built-in; XML data type can be used as a parameter to these functions. So I guess that the third statement of QotD is not correct.


I took the cynical view that because the second part was correct and most people don't think of cast and convert as scalar functions but as something quite different (in the case of CAST, they are probably right, ie BOL is probably wrong, as it looks like a coercion context marker and not a function of any kind; it would probably be stretching it rather a lot to say the same of convert though, so BOL is right about convert) the question author would probably not have considered CAST and convert as scalar functions and would want the wrong answer. So I ticked all three boxes,found my cynical guess was right, and came to the discussion to make exactly the comment you made, only to find that two people had beat me to it.


Tom
Post #886945
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse