I have a column in my database containing some urdu language text. When I use bcp to export the data and opening the exported file in excel I am getting all the way question marks there.
What am I missing ?
Thanks in advance
You're using unicode urdu characters here. Use bcp -w instead for unicode characters.
Related
I have a csv file generated from Japanese source system. The Japanese character is shown as given below ¬¼ˆã—Ê튔Ž®‰ïŽÐ ‘åã‰c‹ÆŠ. I have changed file type to UTF-8 and also ETL setting to incorporate that but that is working on new data only.
How can I change existing data in my table which shows characters like ‘åã‰c‹ÆŠ.
Is it possible to get original Japanese characters using SQL functions. I am using SQL Sever as database.
Thanks in advance.
I am exporting data from tables using BCP utility. Some columns in db contains urdu language text.
When the file is exported I only see ??? in place of urdu text.
I am not able to figure out what's wrong ? what am I missing ?
thanks in advance
Use -w switch to allow bcp copy unicode data.
Something like......
bcp MyDB.dbo.TableName OUT D:\Folder\TestFile.txt -T -w
I'm trying to convert an excel file to sql.
but i'm getting below error.
when i change on truncation value to "ignore" , the convert process will be complete but persian characters will be seen as "?".
Make sure that all your destination columns are NVARCHAR if they are going to be accepting Unicode text.
See here for a detailed explanation: What is the difference between varchar and nvarchar?
As you know, import excel files to SQL server database is doing by Access Engine, in most of the cases that you see this error, it could be solved by below method:
At first, you create an access file and save it in MDB format (this format could be used in SQL server),
and then import your excel file to this Access.mdb file, when all your data is complete, you can import this MDB file from the SQL server to your database,
I have an odd problem. I need to export Japanese characters from a table to a raw text file. When I run the select statement in SQL, I am able to see the characters displayed correctly. However, when I run the SSIS package to export these values to a text file they are displayed as ?'s.
Data type of the field is NTEXT. Has anyone ran into this problem before?
SQL statement:
select cast(body as nvarchar(max)) as body from msgsMarket
In SSIS package's flat file connection manager, I have set the output encoding to use 932
This is not a solution but might probably help you to identify the problem in your case.
Created a sample SSIS package using SSIS 2008 R2 with UTF-8 and Unicode encodings and the SQL Server data exported correctly to flat files.
Sample SQL data in the file. Description field was of data type NVARCHAR. The sample was also tried by changing the data type of the Description field to NTEXT and the flat files still exported correctly.
SSIS package was created with a data flow task with two outputs for UTF-8 and Unicode.
First flat file connection manager to generate flat file with encoding UTF-8.
Output file generated with UTF-8 encoding.
Second flat file connection manager to generate flat file with encoding Unicode.
Output file generated with Unicode encoding.
I need to parse a flat file which is containing backspace (^H) character delimiter between fields. I need to parse this file and insert into sql server 2005 tables.I tried to use bcp utility along with the format file but I wasn't able to specify the delimiter as backspace.
The default one is tab (\t). There are several other delimiters as well but none to specify backspace. Anyone has any ideas, please do help me.
Also I need to export data from sql server table to fixed length flat file.I tried to use non-xml format file, but always it asks for a delimiter.How can I create a flat file using bcp without any delimiter between the fields?
All above are character files.
This is an ugly workaround, but you could always find something that's not in the flat file, and replace everything in the flat file with that, then use that as the column terminator (using bcp -t that).
Sorry that I'm almost 11 years late on this, hopefully you've already solved your problem but you can use the hexadecimal representation of the backspace character 0x08 to parse your input file and properly delimit your fields which are separated with a backspace character.