有用sql语句一
Posted ChineseMoonGod
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了有用sql语句一相关的知识,希望对你有一定的参考价值。
1 DECLARE 2 @retval int, 3 @param1 int 4 EXECUTE @retval=master.dbo.xp_fileexist ‘D:\TkSoft\SamplePic\FabricImg\A1NC8606.BMP‘, @param1 OUTPUT 5 IF @param1 = 0 6 PRINT ‘File does not exist!‘ 7 ELSE 8 PRINT ‘File exists!‘ 9 10 11 select * into samp 12 from openrowset(‘SQLOLEDB‘, ‘192.168.0.180‘; ‘sa‘; ‘hualong2012‘, soyerp.dbo.samp) 13 14 15 16 declare @auid nvarchar(50) 17 declare auth_cur cursor for 18 select replace(花型编号,‘ ‘,‘" "‘) 19 from samp 20 open auth_cur 21 fetch next from auth_cur into @auid 22 while (@@fetch_status=0) 23 begin 24 DECLARE 25 @retval int, 26 @param1 int, 27 @name nvarchar(200) 28 set @name=‘D:\TkSoft\SamplePic\FabricImg\‘+@auid+‘.BMP‘ 29 EXECUTE @retval=master.dbo.xp_fileexist @name, @param1 OUTPUT 30 IF @param1 = 0 31 print @auid 32 fetch next from auth_cur into @auid 33 end 34 close auth_cur 35 deallocate auth_cur
以上是关于有用sql语句一的主要内容,如果未能解决你的问题,请参考以下文章