日期:2014-05-17 浏览次数:20402 次
create table A( WorkID int identity(1,1) primary key not null, AgentID varchar(36) null, AgentName nvarchar(64) null, WorkStateID varchar(4) null, Summary varchar(100) null, Worklog varchar(500) null, CreateTime datetime null, UpdateTime datetime null, Is_MSG varchar(1) null, SendMSGTime datetime null, Mobile varchar(50) null, Callname nvarchar(64) null ) go ------------------------------------------------------- 15 8c7ec15f 周小伟 NULL 哈哈 个电饭锅体育用途 2012-08-16 17:00:17.200 NULL 1 2012-01-01 22:38:00.000 13555678899 电饭锅 16 8c7ec15f 周小伟 NULL 测试2 测试你懂的 2012-08-16 17:22:43.310 NULL 1 2012-08-21 08:00:00.000 15800596430 张伦铭
CREATE TABLE B ( [ID] [int] IDENTITY(1,1) NOT NULL, [Mobile] [varchar](50) NULL, [SendTime] [datetime] NULL, [AgentID] [varchar](36) NULL, [Msg] [varchar](500) NULL, [ReceiveName] [varchar](64) NULL, [SedMsgID] [decimal](18, 0) NULL ) ------------------------------------- 1 13877688909 2012-08-20 09:20:00.000 8c7ec15f aassddff zlm NULL
插A表语句 insert into swcl(agentid,agentname,summary,worklog,createtime,is_msg,sendmsgtime,mobile,callname) values(@agentid,@agentname,@summary,@worklog,getdate(),@is_msg,@sendmsgtime,@mobile,@callname) 插B表语句 insert into TBL_TimingSendMsg(mobile,sendtime,agentid,msg,receivename) values(@mobile,@sendtime,@agentid,@msg,@receivename)