troubleshooting Question

Bulk insert- Text identifier

Avatar of adobner
adobner asked on
Microsoft SQL Server
9 Comments1 Solution462 ViewsLast Modified:
I need to import into SQL a text file that I get daily.
I tried to do it with a DTS and it went perfect the only problem is that the name of the file changes everyday (it's a Dated file).
So I thought about doing a INSERT BULK the problem is that I can't find how to specify the Text identifier, the problem is like this one of the columns is a definition, some times the definition in it self have a coma so the INSERT BULK cuts the definition and start the next column, in this case the definition is delimited with double quotes ("), else it doesn’t have it...

Here’s an example of the import:

CNS,Cohen & Steers Inc.,19247A100,              781126
CNT,CENTERPOINT PROPERTIES CORP,151895109,             6020355

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros