Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kamii47
Constraint Violating Yak Guru
353 Posts |
Posted - 2012-09-17 : 09:20:48
|
I have a stored procedure in which I am reading node's data from xml data typeNow i also have to declare some variable bu always get error if declaring itWITH XMLNAMESPACES('http://idealliance.org/Specs/mailxml12.0a/mailxml_tm' AS p3) declare @ConsigneeApptID int declare @PartnerId intPlease let me know what would be the problem in the syntaxKamran ShahidPrinciple Engineer Development(MCSD.Net,MCPD.net) |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-09-17 : 10:01:14
|
You probably want to declare the variables before the WITH clause. The WITH clause by itself is not a complete statement. The cte or namespace that the WITH clause specifies should always be followed by a select/insert/delete statement outside of the WITH clause. http://msdn.microsoft.com/en-us/library/ms177400.aspx |
 |
|
|
|
|