﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / General / SQL Server 7,2000  / Inserting RAW Data to Table with selected columns / 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>Fri, 24 May 2013 13:59:45 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Inserting RAW Data to Table with selected columns</title><link>http://www.sqlservercentral.com/Forums/Topic742430-9-1.aspx</link><description>You can bulk insert into a temporary table and then select the columns you desire. Here is an example:[code]DECLARE @TempTable TABLE(	Column1 INT,	Column2 VARCHAR(10),	Column2 VARCHAR(10))BULK INSERT @TempTable FROM 'Filepath'SELECT Column1, Column2FROM @TempTable[/code]As an alternative, I believe that you can use a format file to bulk insert directly into your desired table.</description><pubDate>Tue, 30 Jun 2009 11:01:16 GMT</pubDate><dc:creator>stopitallready</dc:creator></item><item><title>Inserting RAW Data to Table with selected columns</title><link>http://www.sqlservercentral.com/Forums/Topic742430-9-1.aspx</link><description>Hi,Anyone can help me, on how to insert a RAW Data to a Table with selected columns. I need only the Column1 and Column3 to be inserted. Thanking you.TextFile : RawData.CSV----------------------Column1,Column2,Column31111111,AAAAAA,BBBBBBB2222222,AAAAAA,BBBBBBB3333333,XXXXXX,CCCCCCTable : RAWDATA-----------------Column1 int,Column2 varchar(10),Column3 varchar(10),Regards,FPalero</description><pubDate>Fri, 26 Jun 2009 01:40:54 GMT</pubDate><dc:creator>fspalero</dc:creator></item></channel></rss>