-- =============================================
-- 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. 使用AFNetWorking 实现以Basic Authentication方式获取access-token

    由于服务器端对于调用API获取数据接口进行了限制,需要在调用API之前获取一个access-token,所以需要在iOS里实现获取这个access-token的功能. 服务器端是在ASP.NET中基于 ...

  2. ABAP SPLIT

    注意: 假定'\'为分隔符 * '1'会分成1部分,值为1 * 分隔符之前的即使是空白或没有,也算一部分. 最后一个分隔符之后的,若有值会算一部分.若没有值,则不会算 比如'\1\'会分成2部分 '\ ...

  3. google浏览器打开报出文件不可读解决方案

    1.打开*.desktop文件 gedit ~/.local/share/applications/name.desktop 在文件中做改动: The .desktop file should loo ...

  4. 剑指offer六:反转链表

    输入一个链表,反转链表后,输出链表的所有元素 public class ListNode { int val; ListNode next = null; ListNode(int val) { th ...

  5. 在windows上搭建react-native的android环境

    参考文档: http://facebook.github.io/react-native/docs/getting-started.html http://reactnative.cn/docs/0. ...

  6. 腾讯云>>云通信>>TLS后台API在mac上JAVA DEMO搭建

    1.相关文档地址 2.相关demo代码 代码部分作了修改,使用了commons-io中的IOUtils.toString简化了io操作 public class Demo { public stati ...

  7. Css 备忘知识点

    1.Chrome 中文界面下默认会将小于 12px 的文本强制按照 12px 显示,可通过加入 CSS 属性 -webkit-text-size-adjust: none; 2.HTML5的form如 ...

  8. Adroid 展开收起效果实现

    Layout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns ...

  9. mybatis入门_mybatis基本原理以及入门程序

    一.传统jdbc存在的问题 1.创建数据库的连接存在大量的硬编码, 2.执行statement时存在硬编码. 3.频繁的开启和关闭数据库连接,会严重影响数据库的性能,浪费数据库的资源. 4.存在大量的 ...

  10. node.js学习笔记(二)

    1.接受参数:get 和 post login.html <form action="./login" method="get"><!--me ...