Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
How to export text file by xp_cmdshell for Thailand Language
Hariharan Krishnamoorthi
Apr 5 2017 10:38 AM
279
Reply
Hi All,
I am trying to export customer table records to text file by using xp_cmdshell.
But when customer records are in Thailand language, the out put comes with undefined characters like '?????????) '
QUERY
SELECT @FilePath='D:\CustomerReports\Customers.txt'
SELECT @Command = 'bcp "SELECT * FROM "' + @dbname + '".dbo.tblCustomer(nolock)" queryout ' +@FilePath+ ' -S' + @@servername + ' -T -c -t "" '
EXEC master..xp_cmdshell @Command
Please how to resolve to display the charaters as thailand language.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Get Data using Joins in sqlserver
Remove Extra Space between string in whole column