sql - How do I take all of the text from a file and insert it into one row's column? -



sql - How do I take all of the text from a file and insert it into one row's column? -

i want read of text in file , insert table's column. 1 suggested way utilize bulk insert. because of syntax, thought improve bulk insert temp table, eventually, select temp table along other values fill main table's row.

i tried:

use [db] create table #importtext ( [xslt] nvarchar(max) ) mass insert #importtext 'c:\users\me\desktop\test.txt' select * #importtext drop table #importtext

but, creating new row in #importtext per newline in file. don't want split @ all. not find fieldterminator allow this. (i.e. end of file character)

try this:

bulk insert #importtext 'c:\users\me\desktop\test.txt' (rowterminator = '\0')

sql sql-server sql-server-2012 text-files bulkinsert

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -