Click here to Skip to main content
15,889,858 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to insert a text file with unicode characters . Its not inserting completely !.
My file having aroud 7 lakhs unicode characters. I need to insert it through SQL without using any programming technilogies.

I need to insert it through SQL query
Can anyone suggest a solution ?


I am using nvarchar (MAX).

What I have tried:

I tried this

BULK INSERT FileContent 
FROM   'myfilepath' with (rowterminator ='none',codepage='ACP')
Posted
Updated 17-Nov-17 14:39pm
Comments
CHill60 17-Nov-17 9:00am    
What do you mean by "not inserting completely" - what is actually happening?
Richard MacCutchan 17-Nov-17 9:15am    
It's not working, obviously. Goodness, no wonder you lost 12 points. :))
CHill60 17-Nov-17 12:57pm    
Ha ha! :-D

1 solution

Try:
BULK INSERT Filecontent
   FROM 'myfilepath'
      WITH (DATAFILETYPE='widechar',
             FIELDTERMINATOR='none'
      );
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900