|
@@ -4,7 +4,7 @@ update tlive_usercount set fadjustcount=t.fadjustcount from (
|
|
|
case when RAND()>0.5 then cast(floor(rand()*20) as int ) else -cast(floor(rand()*12) as int ) end as fadjustcount2
|
|
|
from (
|
|
|
select ROW_NUMBER()over(partition by channelid order by time desc)as row, channelid,time,count,isnull(fadjustcount,0)as fadjustcount from tlive_usercount where fadjustcount is not null
|
|
|
- and channelid in $channelid$
|
|
|
+ and channelid in $channelid$ and CONVERT(varchar(10),time,120)=CONVERT(varchar(10),getdate(),120)
|
|
|
)t where t.row=1
|
|
|
)t
|
|
|
)t where t.channelid=tlive_usercount.channelid and tlive_usercount.fadjustcount is null
|