insert into file (file_ip, file_doc) values ('192.168.1.125', 'C:\Documents and Settings\'\桌面\方案.doc')这句insert里file_doc是文件的路径,但文件路径C:\Documents and Settings\'\桌面\方案.doc中间出现了一个'号,insert就不能执行了..这该怎么解决?
调试欢乐多
or
REPLACE去掉?
declare @t table(ip varchar(30),path varchar(50))
insert @t select '192.168.1.125', 'C:\Documents and Settings\''\桌面\方案.doc'
select * from @t
/*
ip path
------------------------------ --------------------------------------------------
192.168.1.125 C:\Documents and Settings\'\桌面\方案.doc*/
insert into file (file_ip, file_doc) values ('192.168.1.125', ''C:\Documents and Settings\''\桌面\方案.doc'')