1

I have text files which contain one word per line, and I would like to add this content to a column in my table, the column type is Varchar, how can I accomplish that?

1
  • There are many ways to do this. Is there any specific technology you'd prefer to use? Anything you want to avoid? Commented Dec 30, 2010 at 2:41

2 Answers 2

2

You can treat your file as a special case of CSV - it's a CSV file with only one column.

See this article for how to bulk insert from a CSV file.

BULK
INSERT CSVTest
FROM 'c:\csvtest.txt'
WITH
(
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
)
GO
Sign up to request clarification or add additional context in comments.

Comments

0

You can also use import wizard provided in the management studio. You can check this link for your reference.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.