Error while executing sp_get_query_template

  • Inside the sp_get_query_template
    I have Some declaration parameters , used in the query
    i have SELECT Statement with the union of another SELECT Statement

    Msg 10523, Level 16, State 3, Procedure sp_get_query_template, Line 1 [Batch Start Line 0]
    Cannot generate query template because @querytext does not contain a valid single query.

    Please help me in this to resolve..

  • Post the code, please.

    I imagine it's going wrong because you have DECLARE statements in your query text.  You should only include the actual query.

    John

Viewing 2 posts - 1 through 1 (of 1 total)

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