• Sean Lange (8/27/2012)


    Luis Cazares (8/27/2012)


    I guess it was wrong for me to read the 2012 version as it is less explicit.

    But I still believe the OP won't have an option on creating the indexed view with this query. At least it won't give the same output.

    I would agree. I think that properly indexing the base tables as Lowell suggested is the most likely path to a solid solution in this case. With no more details to work with though it is hard to say.

    The XQUERY references (i.e. the stuff in the .value() constructs) will preclude this from being deterministic, so you won't be able to mark it schemabound. Without schema-bound you won't be able to index it.

    It's actually one of the restrictions in the article mentioned above.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?