L
ljzboy
Unregistered / Unconfirmed
GUEST, unregistred user!
小弟遇到一个参数输出的问题,问题出在输入参数是real的问题上:
CREATE PROCEDURE dbo.sp_mc_rating
@mkt varchar(30),
@channelname varchar(10),
@target1 varchar(10),
@virtime real,
@spottime real,
@Rtg1 char(10)='' output
AS
declare @SQL varchar(8000)
set @SQL='select '''+(@Rtg1)+'''=cast('+@mkt+'.rating as char(10)) from '+@mkt+' where target='''+@target1+''' and channelname='''+@channelname+''' and daypart>'''+@virtime+''' and daypart<='''+@spottime+''''
exec(@SQL)
GO
问题就在@virtime和@spottime这两个变量在过程中应该怎么写。就差这一点点了,请指教
谢谢!
CREATE PROCEDURE dbo.sp_mc_rating
@mkt varchar(30),
@channelname varchar(10),
@target1 varchar(10),
@virtime real,
@spottime real,
@Rtg1 char(10)='' output
AS
declare @SQL varchar(8000)
set @SQL='select '''+(@Rtg1)+'''=cast('+@mkt+'.rating as char(10)) from '+@mkt+' where target='''+@target1+''' and channelname='''+@channelname+''' and daypart>'''+@virtime+''' and daypart<='''+@spottime+''''
exec(@SQL)
GO
问题就在@virtime和@spottime这两个变量在过程中应该怎么写。就差这一点点了,请指教
谢谢!