I am using the following
--COPY DISK
DECLARE @.FileName varchar(200),
@.bcpCommand varchar(2000)
SET @.FileName =
REPLACE('C:\OUTPUT\'+CONVERT(char(8),GET
DATE(),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
MacisuMacisu,
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),GET
DATE(),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.
;)
"Alejandro Mesa" wrote:
> Macisu,
> Try using the "-w" argument.
>
> AMB
> "Macisu" wrote:
>
Showing posts with label diskdeclare. Show all posts
Showing posts with label diskdeclare. Show all posts
Monday, March 12, 2012
QUERY OUT - SQL SERVER 2000
Labels:
bcpcommand,
database,
diskdeclare,
filename,
following-copy,
microsoft,
mysql,
oracle,
query,
server,
sql,
varchar
Subscribe to:
Posts (Atom)