# Database Discussions > Microsoft SQL Server 2005 >  Dynamic sql openxml

## Tiger78

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.

----------


## rmiao

How did you generate dynamic sql statement? Didn't see any variable in the statement.

----------

