select @CountAll = count(*) from SupplyAndDemandInfo
select @TodayCount = count(*) from SupplyAndDemandInfo
where datetime = convert(char(4),YEAR (getdate()))+rtrim(convert(char(2),month(getdate())))+rtrim(convert(char(2),day(getdate())))
select @TodayCount = count(*) from SupplyAndDemandInfo
where datetime = convert(char(4),YEAR (getdate()))+rtrim(convert(char(2),month(getdate())))+rtrim(convert(char(2),day(getdate())))
@CountAll int OUTPUT,
@TodayCount int OUTPUT
AS
select @CountAll = count(*) from SupplyAndDemandInfo
select @TodayCount = count(*) from SupplyAndDemandInfo
where datetime = convert(char(4),YEAR (getdate()))+rtrim(convert(char(2),month(getdate())))+rtrim(convert(char(2),day(getdate())))
@CountAll int OUTPUT,
@TodayCount int OUTPUT
AS
set nocount on
begin
select @CountAll = count(*) from SupplyAndDemandInfo
select @TodayCount = count(*) from SupplyAndDemandInfo
where [datetime] =convert(char(8),getdate(),112)
end
@CountAll int OUTPUT,
@TodayCount int OUTPUT
AS
select @CountAll = count(*) from SupplyAndDemandInfo
select @TodayCount = count(*) from SupplyAndDemandInfo
where datetime = getdate()
@CountAll int OUTPUT,
@TodayCount int OUTPUT
ASbegin
select @CountAll=count(*) from SupplyAndDemandInfo
select @TodayCount=count(*) from SupplyAndDemandInfo
where convert(char(8),getdate(),112)=[datetime]
end