Link to home
Start Free TrialLog in
Avatar of Mohammad Alsolaiman
Mohammad AlsolaimanFlag for Saudi Arabia

asked on

export table into text file with Unicode format

Hi
With SQL Server Import and Export Wizard.
 Or Microsoft SQL Server Management Studio
Can I export table into text file with Unicode format?

ExecuteInGrid.PNG
ExcuteInText.PNG
Avatar of kaminda
kaminda
Flag of Sri Lanka image

One simple way of doing this is within Management Studio

1. Execute your script
2. In the results grig,  Click on the top middle tab between rows and columns to select the whole result set
3. Right click on the results grid and select save result as
4. Give a name to the file and on the save button click on the small down arrow
5. Select Save with encoding
6. Select unicode and the output file type.

This is really easy and quick.
Avatar of Mohammad Alsolaiman

ASKER

Kaminda:
5. Select Save with encoding
6. Select unicode and the output file type.
------------
i don't have Save with encoding
see the photo please
SaveAs.PNG
ASKER CERTIFIED SOLUTION
Avatar of kaminda
kaminda
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or you can use simple BCP to get to the same. Use -w/N switch:

bcp "SELECT AWR_CTL_NO,AWR_CODE, AWR_CAT, AWR_PERIOD_TO_DT FROM RSNFS.RSNFS.TBPRSAWR WHERE AWR_DECI_DATE = 14320501" queryout TData.TXT -T -w

Open in new window

Or you can use simple BCP to get to the same. Use -w/N switch:

bcp "SELECT AWR_CTL_NO,AWR_CODE, AWR_CAT, AWR_PERIOD_TO_DT FROM RSNFS.RSNFS.TBPRSAWR WHERE AWR_DECI_DATE = 14320501" queryout TData.TXT -T -w

Open in new window

OK kameda, thank u very much it works
sameer2010
Or you can use simple BCP to get to the same. Use -w/N switch:
i am very new SQL Server
i dont know what you meen and where to write it?
thanks a lot