-
Execute OPENXML SQL statement dynamically
I am attempting to execute a dynamic SQL statement involving OPENXML. Example:
'SELECT * FROM OPENXML (' + CAST(@idoc AS VARCHAR(10)) + ', ''' + @RowPattern + ''', 3) WITH (' + @SchemaDeclaration + ')'
However, SQL Server generates an error when trying to process the @idoc value. The error message is something along the lines of:
Msg 170 ... "Incorrect syntax near"
Is there a simply way around this? This is obviously SQL Server 2000, not 2005.
Your help is appreciated...
-
Just joined
how do I see the other posts?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|