Results 1 to 2 of 2

Thread: Dynamic sql openxml

  1. #1
    Join Date
    Jan 2009
    Posts
    2

    Dynamic sql openxml

    I am trying a dynamic sql with an OPENXML. It does not appear to like the passing of the idoc integer.

    @XMLParseCommand: select comment1 FROM OPENXML (51, 'Transaction', 2); WITH (comment1 varchar(100))e

    execute(@XMLParseCommand)

    Msg 102, Level 15, State 1, Line 1
    Incorrect syntax near 51.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    How did you generate dynamic sql statement? Didn't see any variable in the statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •