• 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