July 25, 2014 at 12:30 am
Jeff Moden (7/24/2014)
I wasn't looking at it that way. I was looking at sending a much larger volume of rows that might justify a form of "poor man's replication".
Ah, that makes more sense. No, definitely not for that. It's for specific use cases. If I could send @Table parameters into a foreign database I wouldn't use the XML except for output to external sources. Glad I asked for clarification. 🙂
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
July 25, 2014 at 12:53 pm
Evil Kraig F (7/25/2014)
Glad I asked for clarification. 🙂
Me to. And fully agreed on the cross server use of table variables. It could really cut down on the I/O and CPU overhead on a system that does possible hundreds of these things per second.
--Jeff Moden
July 25, 2014 at 1:27 pm
I did not go though all the replies but am throwing this out there.
I had to do the same thing a few years ago and here is how I did it (was processing over a million records straight from a table to an xml file using ssis)...
DECLARE @XmlOutput xml
SET @XmlOutput =
(
select RecordType "Participant/recordtype",
ProfileID "Participant/accountnumber"
from dbo.Table
where 1=1
and Report_Year = @Report_Year
and Report_Month = @Report_Month
for xml path(''),
root('PutRootHere')
)
SELECT @XmlOutput
Viewing 3 posts - 31 through 32 (of 32 total)
You must be logged in to reply to this topic. Login to reply