如何解决Sql Server 2005中的错误7375 [英] How to resolve Error 7375 in Sql Server 2005
本文介绍了如何解决Sql Server 2005中的错误7375的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友......
我使用Sql Server 2005开发报告。为此我在sql server 2005中创建了链接服务器到proficy historian。我有一个以下存储过程。
Hello friends...
I m using Sql Server 2005 to develop report. for that I have created linked server to proficy historian in sql server 2005. I have a following stored procedure.
declare @batch varchar(50)
set @batch='LT20623'
drop table #batchdata
create table #batchdata
(
[value] varchar(20),
[timestamp] datetime
)
drop table #batchdata2
create table #batchdata2
(
tagname varchar(50),
[timestamp] varchar(50),
[value] varchar(30)
)
insert into #batchdata select * from Batch_1 order by timestamp desc
declare @query varchar(500)
declare @starttime datetime
declare @endtime datetime
declare @subsequenttag varchar(50)
set @starttime=(select min(timestamp) from #batchdata where value=@batch)
declare @subsequentcount int
set @subsequentcount=(select count(*) from #batchdata where timestamp>@starttime)
if (@subsequentcount =0)
begin
select @endtime=getdate()
end
else
begin
select @endtime=min(timestamp) from #batchdata where value!=@batch and timestamp>@starttime
end
select @starttime as starttime, @endtime as endtime
declare @stime varchar(20)
declare @etime varchar(20)
set @stime=convert(varchar,datepart(month,@starttime))+'/'+convert(varchar,datepart(day,@starttime))+'/'+convert(varchar,datepart(year,@starttime))+' '+convert(varchar,datepart(hour,@starttime))+':'+convert(varchar,datepart(minute,@starttime))+':'+convert(varchar,datepart(second,@starttime))
set @etime = convert(varchar,datepart(month,@endtime))+'/'+convert(varchar,datepart(day,@endtime))+'/'+convert(varchar,datepart(year,@endtime))+' '+convert(varchar,datepart(hour,@endtime))+':'+convert(varchar,datepart(minute,@endtime))+':'+convert(varchar,datepart(second,@endtime))
set @query='select * from openquery(PIMS_HIST,''set fmtonly OFF starttime="'+@stime+'",endtime="'+@etime+'",samplingmode=rawbytime,rowcount=0 select tagname,timestamp,value from ihrawdata where tagname=PIMS-LOTE-1.LOTE.PIMS.Global.AIPV_28'')'
insert into #batchdata2 exec(@query)
select * from #batchdata2
当我执行上面创建的过程时,它会抛出一个错误7357.请帮助我。
when I execute the above created procedure it throws an error 7357. Please help me.
推荐答案
看看这里:错误7357 [ ^ ]
建议的操作: 验证指定的表是否存在。验证是否对指定的一个或多个表授予了适当的权限。
Have a look here: Error 7357[^]
Recommended action: Verify that the table or columns specified exist. Verify that the appropriate permissions are granted on the table or columns specified.
这篇关于如何解决Sql Server 2005中的错误7375的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文