Scalar Variable Error

  • When I am creating a data in the XML document type in SQL. At the time of executing the

    sp_xml_preparedocument i am getting the error "Must declare the scalar variable @doc"

    My code is a follows:

    DECLARE @DOC int

    DECLARE @XMLDOC nvarchar(1000)

    SET @XMLDOC = N'

    OrderDate="2006-07-04T00:00:00">

    OrderDate="2006-08-16T00:00:00">

    '

    At the time of creating an internal representation of the xml document by

    "exec sp_xml_preparedocument @doc output, @xmldoc

    i am getting the error message:- Must declare the scalar variable "@doc"

    please let me know what is to be done.

  • Is the default collation of your database (or instance) case-sensitive?

    With case-sensitive collations "@DOC" "@doc".

    ML

    ---
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

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

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