XML

  • Comments posted to this topic are about the item XML

  • 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.

  • 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.


    [font="Arial Narrow"](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.[/font]

  • 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.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Pure guess work - I am never used XML datatype



    [font="System"]Bhavesh Patel[/font]

    http://bhaveshgpatel.wordpress.com/
  • 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

Viewing 6 posts - 1 through 5 (of 5 total)

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