|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
QUERY OUT - SQL SERVER 2000--COPY DISK DECLARE @FileName varchar(200), @bcpCommand varchar(2000) SET @FileName = REPLACE('C:\OUTPUT\'+CONVERT(char(8),GETDATE(),1)+'.txt','/','-') SET @bcpCommand = 'bcp "SELECT Column COLLATE SQL_Latin1_General_CP437_CI_AS FROM civ..SALIDAserfi ORDER BY Id " queryout "' SET @bcpCommand = @bcpCommand + @FileName + '" -U sa -P 123 -c ' EXEC master..xp_cmdshell @bcpCommand ---------------------------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------------------------- My table in SQL SERVER appears the following: PARA UN MEJOR SERVICIO. SE HA DISEÑADO but in the moment of to write to disk : PARA UN MEJOR SERVICIO. SE HA DISE¥ADO UN I need to write ñ NOT ¥ How to fix the caracter ñ (¥)? What can I do? Thanks Macisu Macisu,
Try using the "-w" argument. AMB Show quote "Macisu" wrote: > I am using the following > > > --COPY DISK > DECLARE @FileName varchar(200), > @bcpCommand varchar(2000) > > SET @FileName = > REPLACE('C:\OUTPUT\'+CONVERT(char(8),GETDATE(),1)+'.txt','/','-') > > SET @bcpCommand = 'bcp "SELECT Column COLLATE SQL_Latin1_General_CP437_CI_AS > FROM civ..SALIDAserfi ORDER BY Id " queryout "' > SET @bcpCommand = @bcpCommand + @FileName + '" -U sa -P 123 -c ' > > EXEC master..xp_cmdshell @bcpCommand > > ---------------------------------------------------------------------------------------- > QUESTION > ---------------------------------------------------------------------------------------- > > > My table in SQL SERVER appears the following: > > PARA UN MEJOR SERVICIO. SE HA DISEÑADO > > but in the moment of to write to disk : > > PARA UN MEJOR SERVICIO. SE HA DISE¥ADO UN > > I need to write ñ NOT ¥ > > How to fix the caracter ñ (¥)? > > What can I do? > > Thanks > > Macisu Thanks
using -w not problem. ;) Show quote "Alejandro Mesa" wrote: > Macisu, > > Try using the "-w" argument. > > > AMB > > "Macisu" wrote: > > > I am using the following > > > > > > --COPY DISK > > DECLARE @FileName varchar(200), > > @bcpCommand varchar(2000) > > > > SET @FileName = > > REPLACE('C:\OUTPUT\'+CONVERT(char(8),GETDATE(),1)+'.txt','/','-') > > > > SET @bcpCommand = 'bcp "SELECT Column COLLATE SQL_Latin1_General_CP437_CI_AS > > FROM civ..SALIDAserfi ORDER BY Id " queryout "' > > SET @bcpCommand = @bcpCommand + @FileName + '" -U sa -P 123 -c ' > > > > EXEC master..xp_cmdshell @bcpCommand > > > > ---------------------------------------------------------------------------------------- > > QUESTION > > ---------------------------------------------------------------------------------------- > > > > > > My table in SQL SERVER appears the following: > > > > PARA UN MEJOR SERVICIO. SE HA DISEÑADO > > > > but in the moment of to write to disk : > > > > PARA UN MEJOR SERVICIO. SE HA DISE¥ADO UN > > > > I need to write ñ NOT ¥ > > > > How to fix the caracter ñ (¥)? > > > > What can I do? > > > > Thanks > > > > Macisu |
|||||||||||||||||||||||