-- =============================================
-- Author: Qiuhua,Huang
-- Create date: 08/09/2012
-- Description: insert into tabel of "call"
-- =============================================
--pro_insertCall 1958,'20',0,0,'22333',2,'2012-05-03','2012-02-03',0
ALTER PROCEDURE [dbo].[pro_insertCall]
@shopId int,
@callerID varchar(200),--callerName
@callstatus int=0,
@callcategory int,
@callcontent varchar(1000),
@adduser int,
@calldatetime varchar(50),
@addtime varchar(50),
@toptradeID int
AS
BEGIN declare @insertSQL VARCHAR(4000) set @insertSQL='
insert into [call](
shopID,
callerID,
callstatus,
calldatetime,
callcategory,
callContent,
adduser,
addtime,
IPTime,
completeTime,
etatime,
toptradeID,
DateRev)
values('
+Convert(varchar,@shopId)+','
+''''+@callerID+''','
+Convert(varchar,@callstatus )+','''
+@calldatetime+''','
+Convert(varchar,@callcategory )+','
+''''+@callcontent +''''+','
+Convert(varchar,@adduser)+','''
+@addtime+''','+
+'null'+','
+'null'+','
+'null'+','
+Convert(varchar,@toptradeID)+','
+'null'+')' print @insertSQL
exec(@insertSQL) declare @callrequestnum varchar(20)
declare @id int
--查询刚插入记录的id
set @id = (select top 1 @@identity from dbo.call)
set @callrequestnum = convert(varchar,@id+1000)
update dbo.call set callrequestnum=@callrequestnum where id=@id END

@@identity的使用的更多相关文章

  1. ASP.NET Core 之 Identity 入门(一)

    前言 在 ASP.NET Core 中,仍然沿用了 ASP.NET里面的 Identity 组件库,负责对用户的身份进行认证,总体来说的话,没有MVC 5 里面那么复杂,因为在MVC 5里面引入了OW ...

  2. ASP.NET Core 之 Identity 入门(三)

    前言 在上一篇文章中,我们学习了 CookieAuthentication 中间件,本篇的话主要看一下 Identity 本身. 最早2005年 ASP.NET 2.0 的时候开始, Web 应用程序 ...

  3. ASP.NET Core 之 Identity 入门(二)

    前言 在 上篇文章 中讲了关于 Identity 需要了解的单词以及相对应的几个知识点,并且知道了Identity处在整个登入流程中的位置,本篇主要是在 .NET 整个认证系统中比较重要的一个环节,就 ...

  4. 从Membership 到 .NET4.5 之 ASP.NET Identity

    我们前面已经讨论过了如何在一个网站中集成最基本的Membership功能,然后深入学习了Membership的架构设计.正所谓从实践从来,到实践从去,在我们把Membership的结构吃透之后,我们要 ...

  5. TSQL Identity 用法全解

    Identity是标识值,在SQL Server中,有ID列,ID属性,ID值,ID列的值等术语. Identity属性是指在创建Table时,为列指定的Identity属性,其语法是:column_ ...

  6. MVC5 - ASP.NET Identity登录原理 - Claims-based认证和OWIN

    在Membership系列的最后一篇引入了ASP.NET Identity,看到大家对它还是挺感兴趣的,于是来一篇详解登录原理的文章.本文会涉及到Claims-based(基于声明)的认证,我们会详细 ...

  7. ASP.NET Identity入门系列教程(一) 初识Identity

    摘要 通过本文你将了解ASP.NET身份验证机制,表单认证的基本流程,ASP.NET Membership的一些弊端以及ASP.NET Identity的主要优势. 目录 身份验证(Authentic ...

  8. 列属性:RowGUIDCol、Identity 和 not for replication

    Table Column有两个特殊的属性RowGUIDCol 和 Identity,用于标记数据列: $ROWGUID 用于引用被属性 RowGUIDCol 标识的UniqueIdentifier 类 ...

  9. SQL Server 合并复制遇到identity range check报错的解决

        最近帮一个客户搭建跨洋的合并复制,由于数据库非常大,跨洋网络条件不稳定,因此只能通过备份初始化,在初始化完成后向海外订阅端插入数据时发现报出如下错误: Msg 548, Level 16, S ...

  10. 坎坷路:ASP.NET Core 1.0 Identity 身份验证(中集)

    上一篇:<坎坷路:ASP.NET 5 Identity 身份验证(上集)> ASP.NET Core 1.0 什么鬼?它是 ASP.NET vNext,也是 ASP.NET 5,以后也可能 ...

随机推荐

  1. Java 异常处理 练习2

    建立exception包,建立Bank类,类中有变量double  balance表示存款,Bank类的构造方法能增加存款,Bank类中有取款的发方法withDrawal(double dAmount ...

  2. 向STM32 CUBE MX 生成的工程里移植stemwin

    我参考这个文章做的: http://bbs.armfly.com/read.php?tid=1678 这次添加的是没有os的版本 另外跟用不用hal库没关系 1. keil自带了emwin 2. 用c ...

  3. 用Django写出“hell world”

    一.系统实战环境 1 2 3 4 系统版本:CnetOS6.5 x86_64 Django版本:Django-1.5.8 MySQL版本:MySQL-5.1.73 Python版本: python-2 ...

  4. C#字节数组转换成字符串

    C#字节数组转换成字符串 如果还想从 System.String 类中找到方法进行字符串和字节数组之间的转换,恐怕你会失望了.为了进行这样的转换,我们不得不借助另一个类:System.Text.Enc ...

  5. MySql的常用命令

    Ubuntu下的安装 打开"终端窗口",输入sudo apt-get update-->回车-->"输入root用户的密码"-->回车 输入s ...

  6. springMVC+mybatis+spring整合案例

    1.web.xml a:配置spring监听,使web容器在启动时加载spring的applicationContext.xml <listener> <listener-class ...

  7. Table样式

    .tb_org th { background-color: #; color: #ffffff; } .tb_org { border-right: 1px solid silver; border ...

  8. python画图

    正弦图像: #coding:utf-8import numpy as npimport matplotlib.pyplot as pltx=np.linspace(0,10,1000)y=np.sin ...

  9. centos5.11 repo 安装mysql5.7

    http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html mysql yum repo 安装说明 http://d ...

  10. excel读取

    一.jar包 二.工具类 package excel; import java.io.FileInputStream; import java.io.FileNotFoundException; im ...