-- =============================================
-- 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. python中文乱码问题

    在学习python的时候,当我要print中文的时候,会出现以下提示: py = '你好,世界!'print py File "n2.py", line 1 SyntaxError ...

  2. OHNL

    先了解一下OGNL的概念 OGNL的全名称Object Graph Navigation Language.全称为对象图导航语言,是一种表达式语言.使用这种表达式语言,你可以通过某种表达式语法,存取J ...

  3. webapi 通过dynamic 接收可变参数

    public class JsonParamModel { /// <summary> /// json key /// </summary> public string Js ...

  4. android 命名 数组 所有国家 String[] COUNTRIES

    static final String[] COUNTRIES = new String[] { "Afghanistan", "Albania", " ...

  5. 微信小程序-表单组件

    button 按钮 注:button-hover 默认为{background-color: rgba(0, 0, 0, 0.1); opacity: 0.7;} 示例代码: /** wxss **/ ...

  6. spring 配置 redis

    1.maven相关pom.xml <dependencies> <!--spring redis--> <dependency> <groupId>or ...

  7. good design

    canvas 效果麦当劳40周年纪念日 效果图 McDonald's 40th Anniversary 交互效果很流畅,赞!

  8. python 03

    数据结构 在 python 中有4种内建数据结构, 列表, 元组, 字典和集合. 列表 list 有序项目的数据结构, 类似数组, 是对象. 列表用中括号中用逗号分隔的项目定义.例如 ['apple' ...

  9. Ioc

    学习过Spring框架的人一定都会听过Spring的IoC(控制反转) .DI(依赖注入)这两个概念,对于初学Spring的人来说,总觉得IoC .DI这两个概念是模糊不清的,是很难理解的,今天和大家 ...

  10. angular中ng-repeat ng-if 中的变量的值控制器中为什么取不到

    这个问题的本质是:v-repeat会产生子scope,这时你在控制器里拿值,相当于父scope里面取子scope的值,因为Angular.js中作用域是向上查找的,所以取不到. 操作过程如下: 相关代 ...