- /****** Script for SelectTopNRows command from SSMS ******/
- SELECT *
- FROM [ANTU20480330].[dbo].[T_Call_CallRecords]
-
- --增加坐席组编号字段
- --alter table T_Call_CallRecords add groupcode nvarchar(50)
-
- --搜索坐席对应的坐席组
- --select * from T_Sys_SeatGroup where F_ZXZID=(select F_SeartGroupID from T_Sys_UserAccount where F_UserCode='8000' )
- declare @usercode nvarchar(50);
- set @usercode='8000'
- select dbo.GetSeatCodeByUserCode(@usercode)
-
- --设置通话记录中对应坐席组
- --update T_Call_CallRecords set groupcode=dbo.GetSeatCodeByUserCode(UserCode)
-
|