I've Proc1 and Proc2, the output of Proc2 can be in XML or thru a
normal Select statement, depending upon the input parameter specified
(@xmflag). The default of @xmflag = 0 which means non-XML output. Now
Proc1 is calling Proc2 and inserting the output of Proc2 in a temp
table without specifing the @xmflag parameter. The message coming is
"The FOR XML clause is not allowed in a INSERT statement". I don't
understand why this msg is coming when the Select statement FOR XML is
not executing.
Anybody knows the reason?
Thanks in advance.
Subodh