﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Bulk Inserting Comma separated Quotation Delimited text file / 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>Thu, 20 Jun 2013 06:32:56 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Bulk Inserting Comma separated Quotation Delimited text file</title><link>http://www.sqlservercentral.com/Forums/Topic1406531-391-1.aspx</link><description>[quote][b]Jeff Moden (1/13/2013)[/b][hr][quote][b]jerry-621596 (1/13/2013)[/b][hr]SSIS would handle this very nicely and be easily repeatable.[/quote]Agreed.  ACE drivers with OPENROWSET would also work well.[/quote]Thanks, I'll research that.</description><pubDate>Mon, 14 Jan 2013 04:49:27 GMT</pubDate><dc:creator>Frank Cazabon</dc:creator></item><item><title>RE: Bulk Inserting Comma separated Quotation Delimited text file</title><link>http://www.sqlservercentral.com/Forums/Topic1406531-391-1.aspx</link><description>Sorry, I should have said this was SQL Server 2008 R2 Express.  I don't think SSIS is available.</description><pubDate>Mon, 14 Jan 2013 04:48:14 GMT</pubDate><dc:creator>Frank Cazabon</dc:creator></item><item><title>RE: Bulk Inserting Comma separated Quotation Delimited text file</title><link>http://www.sqlservercentral.com/Forums/Topic1406531-391-1.aspx</link><description>Thanks Dwain,I'll try that out</description><pubDate>Mon, 14 Jan 2013 04:47:28 GMT</pubDate><dc:creator>Frank Cazabon</dc:creator></item><item><title>RE: Bulk Inserting Comma separated Quotation Delimited text file</title><link>http://www.sqlservercentral.com/Forums/Topic1406531-391-1.aspx</link><description>[quote][b]jerry-621596 (1/13/2013)[/b][hr]SSIS would handle this very nicely and be easily repeatable.[/quote]Agreed.  ACE drivers with OPENROWSET would also work well.</description><pubDate>Sun, 13 Jan 2013 20:39:50 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Bulk Inserting Comma separated Quotation Delimited text file</title><link>http://www.sqlservercentral.com/Forums/Topic1406531-391-1.aspx</link><description>SSIS would handle this very nicely and be easily repeatable.</description><pubDate>Sun, 13 Jan 2013 19:23:03 GMT</pubDate><dc:creator>jerry-621596</dc:creator></item><item><title>RE: Bulk Inserting Comma separated Quotation Delimited text file</title><link>http://www.sqlservercentral.com/Forums/Topic1406531-391-1.aspx</link><description>I'm not sure if this will help you, but the following code will replace the comma embedded between quotation marks (as long as it doesn't appear in the first position) with a semicolon.[code="sql"];WITH MyData (ID, strcol) AS (        SELECT 1, '"BUNGALOW 101,RIDGEWAY DR","POINT FORTIN",,,"TT","868-389-9769",,"ZPXB303191",1'),    NewData (ID, ItemNumber, strcol) AS (        SELECT ID, ItemNumber            ,strcol=CASE WHEN CHARINDEX(',', Item) &amp;gt; 1 THEN REPLACE(Item, ',', ';') ELSE Item END        FROM MyData        CROSS APPLY PatternSplitCM(strcol, '["]'))SELECT ID, (    SELECT strcol + ''    FROM NewData b    WHERE a.ID = b.ID    ORDER BY ItemNumber    FOR XML PATH(''))FROM NewData aGROUP BY ID[/code]The PatternSplitCM FUNCTION can be found in the 4th article linked into my signature line.You would need to decide what character was appropriate to use in place of semicolon, then REPLACE it back to comma after BULK INSERT completes its task (if that is possible).</description><pubDate>Sun, 13 Jan 2013 18:44:35 GMT</pubDate><dc:creator>dwain.c</dc:creator></item><item><title>Bulk Inserting Comma separated Quotation Delimited text file</title><link>http://www.sqlservercentral.com/Forums/Topic1406531-391-1.aspx</link><description>I am receiving a text file with comma separated data with quotation marks around certain fields that I need to bulk insert into SQL Server 2008 R2.  An example of the data is:"BUNGALOW 101,RIDGEWAY DR","POINT FORTIN",,,"TT","868-389-9769",,"ZPXB303191",1As you can see there is a comma in the first field.Using this Bulk Insert command causes that first field to be split into two columns.  I know BOL says this is what is supposed to happen and to choose the separators carefully, but I have no control over the text file which is created by a 20 year old system which cannot be changed.Any ideas how I can import this?</description><pubDate>Sun, 13 Jan 2013 16:48:30 GMT</pubDate><dc:creator>Frank Cazabon</dc:creator></item></channel></rss>