example: --本地创建存储过程调用远程sqlserver数据库的内容CREATE PROCEDURE [dbo].[exshopdiscount] asSET ANSI_NULL_DFLT_ON on //注意 SET ANSI_WARNINGS on //declare @date char(8) set @date=convert(char(8),dateadd(dd,-1,getdate()),112)declare pcursor cursor for select distinct om_dept from [ebtsusql].[tdmis].[dbo].td_originalsale_m inner join [ebtsusql].[tdmis].[dbo].td_originalsale_s on m_sequence=s_sequence, [ebtsusql].[tdmis].[dbo].td_product where os_product=productno open pcursor declare @dept char(5)
fetch next from pcursor into @deptwhile (@@FETCH_STATUS=0) begin ... end
to foolishchao(亚超): 多谢! 问题已经解决!! 但我不知怎样结贴! 让我看看先 from: along407
to happydreamer(绝对的黑): 再次感谢! 问题已经解决!! 散分了 from: along407
--本地创建存储过程调用远程sqlserver数据库的内容CREATE PROCEDURE [dbo].[exshopdiscount] asSET ANSI_NULL_DFLT_ON on //注意
SET ANSI_WARNINGS on //declare @date char(8)
set @date=convert(char(8),dateadd(dd,-1,getdate()),112)declare pcursor cursor
for
select distinct om_dept
from [ebtsusql].[tdmis].[dbo].td_originalsale_m inner join [ebtsusql].[tdmis].[dbo].td_originalsale_s on m_sequence=s_sequence, [ebtsusql].[tdmis].[dbo].td_product
where os_product=productno open pcursor
declare @dept char(5)
fetch next from pcursor into @deptwhile (@@FETCH_STATUS=0)
begin
...
end
多谢!
问题已经解决!!
但我不知怎样结贴!
让我看看先
from: along407
再次感谢!
问题已经解决!!
散分了
from: along407