﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Programming / Powershell  / Set-based Insert from PoSh to SQL table / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 11:04:48 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Set-based Insert from PoSh to SQL table</title><link>http://www.sqlservercentral.com/Forums/Topic1304432-1351-1.aspx</link><description>Anytime Man :)</description><pubDate>Wed, 04 Jul 2012 06:07:48 GMT</pubDate><dc:creator>Laerte Poltronieri Junior-367636</dc:creator></item><item><title>RE: Set-based Insert from PoSh to SQL table</title><link>http://www.sqlservercentral.com/Forums/Topic1304432-1351-1.aspx</link><description>Thanks Laerte!Found you a couple of months ago, I appreciate your work.I also found these functions last week.P</description><pubDate>Wed, 04 Jul 2012 06:05:44 GMT</pubDate><dc:creator>schleep</dc:creator></item><item><title>RE: Set-based Insert from PoSh to SQL table</title><link>http://www.sqlservercentral.com/Forums/Topic1304432-1351-1.aspx</link><description>USe Chad Miller´s [url=http://poshcode.org/2116]Out-DataTable [/url] and [url=http://poshcode.org/2118]Write-DataTable[/url]it use Bulk Insert.</description><pubDate>Wed, 04 Jul 2012 05:45:36 GMT</pubDate><dc:creator>Laerte Poltronieri Junior-367636</dc:creator></item><item><title>RE: Set-based Insert from PoSh to SQL table</title><link>http://www.sqlservercentral.com/Forums/Topic1304432-1351-1.aspx</link><description>Oooooohhh. Me like TVP! :-DThanks opc!</description><pubDate>Wed, 23 May 2012 08:01:01 GMT</pubDate><dc:creator>schleep</dc:creator></item><item><title>RE: Set-based Insert from PoSh to SQL table</title><link>http://www.sqlservercentral.com/Forums/Topic1304432-1351-1.aspx</link><description>Anything you can do in .NET you can do in PoSH. Lookup Table-valued Parameters, and how to use them to insert sets of data using one in a Stored Procedure. Most if not all of the examples will be in C# or VB.net, but like I said, you can port that code to PoSH. TVPs or the .NET class SqlBulkCopy are the two best ways I know of to insert batches of data from memory directly into SQL Server. If you write the data to disk that opens up all the bulk load methods of course, like bcp, BULK INSERT, SSIS, etc.</description><pubDate>Tue, 22 May 2012 13:59:32 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>Set-based Insert from PoSh to SQL table</title><link>http://www.sqlservercentral.com/Forums/Topic1304432-1351-1.aspx</link><description>Hi all,I've been trying to find a way to do set-based inserts into a SQL Server.As near as I can tell, there are only 2 ways:1) convert the data to be inserted to XML, pass that SQL Server, either a sproc or a file;2) export to file and BULK INSERT in SQL Server.Neither of these are especially appealing.Is there not something equivalent to $Table.Insert($NewData)Save-IntoSQLTable appears to be on the right track, but also seems to want only to work with traces.Any ideas?</description><pubDate>Tue, 22 May 2012 13:01:04 GMT</pubDate><dc:creator>schleep</dc:creator></item></channel></rss>