数据库语言中写文件时,我想写入特殊符号&和#这些怎么写呢 改成:SET @sql= 'echo "' +@text +'" >>c:\emailtest\'+@sendFileexec master..xp_cmdshell @sql, no_output 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 declare @text varchar(100),@sql varchar(1000),@sendFile varchar(1000)set @text = '简'set @sendFile='1.txt'SET @sql= 'echo "' +@text +'" >>c:\'+@sendFileexec master..xp_cmdshell @sql, no_output declare @sql varchar(100)declare @text varchar(100)set @text = '简'SET @sql= 'echo "' +@text +'" >>c:\emailtest\'+@sendFileexec master..xp_cmdshell @sql, no_output DOS里用"把特殊字符括起来:SET @sql= 'echo "' +@text +'" >>c:\emailtest\'+@sendFileexec master..xp_cmdshell @sql, no_output 到CMD方式运行下面的命令你就会知道为什么你那样不行.dir *.exe &dir *.txt echo ^&sdaf >> c:\aa.txt 数据分割 怎样改写delete from select * from table 数据库操作如何避免这样的情况发生呢! select * from tz_jy where f_draw_no not in (select f_draw_no from tz_info )为何没数据? 感谢NinGoo的回复,又出新问题,在线等待。 数据库中如何将二进制数据转换为字符串?(50) 求教高手SQL! 分离再附加数据库后,数据文件和日志文件不增大,急啊!!! 有关SQL的书~~~~~~~~~~~ 请问一些关于SQL数据取得的问题!!!!!!!! 关于表变量或临时表,请高手畅言 各位大虾帮忙
set @text = '简'
set @sendFile='1.txt'
SET @sql= 'echo "' +@text +'" >>c:\'+@sendFile
exec master..xp_cmdshell @sql, no_output
declare @text varchar(100)
set @text = '简'
SET @sql= 'echo "' +@text +'" >>c:\emailtest\'+@sendFile
exec master..xp_cmdshell @sql, no_output
exec master..xp_cmdshell @sql, no_output