1.MSSQLSERVER的协议:VIA禁用,其余三个协议启用
2.客户端协议:VIA禁用,其余三个协议打开
3.下面是关于数据库实现的:
将一个表中的数据插入到另一个表中的存储过程
CREATE PROCEDURE [dbo].[proc_Statics_UserRecordMonth]
(
@year int,
@month int,
@CityId int
)
AS
BEGIN
SET NOCOUNT ON;
insert into 表1(ProcessedInput, InputSpelling ,CityId, CityName, [Year], [Month], ProcessedInputClicks)
select top 100 ProcessedInput,InputSpelling,CityId,CityName,[Year], [Month],count(ProcessedInput) as Clicks from 表2 where [month]=@month and [year]=@year and CityId=@CityId group by ProcessedInput,InputSpelling,[year],[month],CityId,CityName order by Clicks desc
END
GroupBy: