摘要:
连接多表,批量 delete一般语法: delete from 表A where ...批量删除语法 : delete 表A from 表A inner join 表B on ... where ...delete tbUser ---易错点from tbUser inner join tbGroup_Member on tbUser.user_id =tbGroup_Member.user_idwhere tbGroup_Member.user_id='1001'连接多表,批量 update 一般语法 : update 表A set A1=0,A2=1 where ...批量 阅读全文
摘要:
在存储过程里面新建临时表的好处很多--判断临时表是否存在,如果存在则删除IF OBJECT_ID('tempdb..#temp_Supplier') IS NOT NULL DROP TABLE #temp_Supplier--新建表CREATE TABLE #temp_Supplier( [K3_supplier_no] [nvarchar](100) NOT NULL, [supplier_id] [int] IDENTITY(1,1) NOT NULL,--注意,临时表的一个作用体现了,可以递增[supplier_name_cn] [nvarchar](50) NOT N 阅读全文
摘要:
SQL Server:向 SQL Server 自增字段插入值【鹏城万里】 发表于 www.sqlstudy.com通常情况下,不能向 SQL Server 自增字段插入值,如果非要这么干的话,SQL Server就会好不客气地给你个错误警告:Server: Msg 544, Level 16, State 1, Line 1Cannot insert explicit value for identity column in table 't' when identity_insert is set to OFF.这个错误消息提示我们,如果向 SQL Server 自增字段插 阅读全文
摘要:
如果单击<asp:button > 后,没有反应,有可能是因为页面添加了验证控件,如某个textbox添加必填验证控件,这个没有填时,则会提交不了。 阅读全文
摘要:
Try con_brmis = Css2DataAccess.GetConnection(Nothing, "css2") tran_All = con_brmis.BeginTransaction("tran_All") Css2DataAccess.ExecuteNonQuery(tran_All, CommandType.Text, Sql_str)'將數據傳輸到供應商管理系統中間數據庫 Css2DataAccess.ExecuteNonQuery(tran_All, CommandType.StoredProcedure, "S 阅读全文
摘要:
con_All = Css2DataAccess.GetConnection(Nothing, "css2") tran_All = con_All.BeginTransaction("tran_All") '1.调用存储过程SP_MAIN_INVOICE,取出库单号;2插入主单 '初始出库单号为1 aPara_All(1).Value = 1 Try Css2DataAccess.ExecuteNonQuery(tran_All, CommandType.StoredProcedure, "SP_MAIN_INVOICE&qu 阅读全文
摘要:
ALTER TRIGGER tgr_mainrequest_updateon tbMain_Request for update as --declare @old_loc_id int ,@old_req_no int --declare @new_loc_id int,@new_req_no int -- select @old_loc_id=location_id,@old_req_no =request_no from deleted-- select @new_loc_id=location_id,@new_req_no =request_no from inserted if... 阅读全文
摘要:
在前台加个按钮 Btn_ExportExcel,然后在后台加上以下的函数Protected Sub Btn_ExportExcel_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btn_ExportExcel.Click Response.Charset = "utf-8" Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312") Response.ClearContent() Res 阅读全文
摘要:
1、在报表设计的时候,字体选中 CIA Code 39 Tall,即可将数据转化为条形码;2、在电脑的 设备和打印机 ——高级——图形 ——TrueType 字体,选中 下载为软字体 ; 阅读全文
摘要:
--建立处理游标 declare sub_order_cur cursor for select tbSub_Order.stock_no ,unit_price ,order_quantity ,unit ,order_remark ,stockreceive_remark ,order_amount from tbSub_Order inner join tbMaster on tbMaster.stock_no=tbSub_Order.stock_no where location_id=@location_id and or... 阅读全文