随笔分类 -  MsSql

SQL 语句转换格式函数Cast、Convert
摘要:SQL 语句转换格式函数Cast、Convert CAST和CONVERT都经常被使用。特别提取出来作为一篇文章,方便查找。 CAST、CONVERT都可以执行数据类型转换。在大部分情况下,两者执行同样的功能,不同的是CONVERT还提供一些特别的日期格式转换,而CAST没有这个功能。 既然C... 阅读全文

posted @ 2015-10-10 17:56 chengjunde 阅读(268) 评论(0) 推荐(0)

存储过程[st_MES_RptInspectShipment]
摘要:USE [ChangHong_612]GO/****** Object: StoredProcedure [dbo].[st_MES_RptInspectShipment] Script Date: 10/10/2015 16:00:02 ******/SET ANSI_NULLS ONGO... 阅读全文

posted @ 2015-10-10 17:40 chengjunde 阅读(212) 评论(0) 推荐(0)

存储过程函数的调用
摘要:USE [ChangHong_612]GO/****** Object: StoredProcedure [dbo].[ImportProductForDay] Script Date: 10/08/2015 11:34:35 ******/SET ANSI_NULLS ONGOSET QU... 阅读全文

posted @ 2015-10-10 17:37 chengjunde 阅读(503) 评论(0) 推荐(0)

SQl函数的写法
摘要:USE [ChangHong_612]GO/****** Object: UserDefinedFunction [dbo].[FN_GetProdQty] Script Date: 10/08/2015 14:05:16 ******/SET ANSI_NULLS ONGOSET QUOT... 阅读全文

posted @ 2015-10-10 17:34 chengjunde 阅读(534) 评论(0) 推荐(0)

加料记录(大屏幕)
摘要:USE [ChangHongWMS612]GO/****** Object: StoredProcedure [dbo].[WMS_MonitorMaterialPut] Script Date: 10/08/2015 09:55:05 ******/SET ANSI_NULLS ONGOS... 阅读全文

posted @ 2015-10-10 17:33 chengjunde 阅读(189) 评论(0) 推荐(0)

SQL Server中如何获取当前年,月,日,时,分,秒
摘要:分类:SQL Serverselect GETDATE() as '当前日期',DateName(year,GetDate()) as '年',DateName(month,GetDate()) as '月',DateName(day,GetDate()) as '日',DateName(dw,Ge... 阅读全文

posted @ 2015-10-10 14:31 chengjunde 阅读(880) 评论(0) 推荐(0)

when not exists 用法
摘要:USE [ChangHong_612]GO/****** Object: StoredProcedure [dbo].[st_MES_UpdateInspectResult] Script Date: 10/09/2015 16:15:36 ******/SET ANSI_NULLS ONG... 阅读全文

posted @ 2015-10-09 17:23 chengjunde 阅读(561) 评论(0) 推荐(0)

FOR XML PATH的用法
摘要:USE [ChangHongWMS612]GO/****** Object: StoredProcedure [dbo].[st_WMS_SelStockInBillList] Script Date: 09/30/2015 10:32:23 ******/SET ANSI_NULLS ON... 阅读全文

posted @ 2015-09-30 10:47 chengjunde 阅读(496) 评论(0) 推荐(0)

存储过程
摘要:USE [ChangHong_612]GO/****** Object: StoredProcedure [dbo].[st_MES_CheckInspect] Script Date: 09/28/2015 09:25:42 ******/SET ANSI_NULLS ONGOSET QU... 阅读全文

posted @ 2015-09-29 09:02 chengjunde 阅读(174) 评论(0) 推荐(0)

sql:[dbo].[smt_MES_RptProductDaily] 生产日报表
摘要:USE [ChangHongMES_904]GO/****** Object: StoredProcedure [dbo].[smt_MES_RptProductDaily] Script Date: 09/15/2015 12:26:38 页面在:RptProduct.aspx ******/SE 阅读全文

posted @ 2015-09-15 12:28 chengjunde 阅读(377) 评论(0) 推荐(0)

sql 调用函数的方法
摘要:USE [ChangHong_612]GO/****** Object: StoredProcedure [dbo].[st_MES_RptInspectWeight] Script Date: 09/10/2015 18:02:47 ******/SET ANSI_NULLS ONGOSE... 阅读全文

posted @ 2015-09-10 18:08 chengjunde 阅读(2086) 评论(0) 推荐(0)

sql的存储过程调用
摘要:USE [ChangHong_612]GO/****** Object: StoredProcedure [dbo].[st_MES_GetCodeRule] Script Date: 09/10/2015 17:44:29 ******/SET ANSI_NULLS ONGOSET QUO... 阅读全文

posted @ 2015-09-10 17:53 chengjunde 阅读(298) 评论(0) 推荐(0)

SQl事物
摘要:Alter PROCEDURE [dbo].[st_KIT_updateStockSendMaterial]( @SupplyNO VARCHAR(20), --供应商编号 @RawNO VARCHAR(30), --原料编号 @StaCode VARCHAR(10), --工作中... 阅读全文

posted @ 2015-09-02 09:36 chengjunde 阅读(107) 评论(0) 推荐(0)

SQL学习
摘要:USE [GuangHongWMS]GO/****** Object: StoredProcedure [dbo].[st_WMS_SelStockInBillList] Script Date: 08/21/2015 11:07:35 ******/SET ANSI_NULLS ONGOS... 阅读全文

posted @ 2015-08-21 11:09 chengjunde 阅读(166) 评论(0) 推荐(0)

FOR XML PATH
摘要:FOR XML PATH 有的人可能知道有的人可能不知道,其实它就是将查询结果集以XML形式展现,有了它我们可以简化我们的查询语句实现一些以前可能需要借助函数活存储过程来完成的工作。那么以一个实例为主.一.FOR XML PATH 简单介绍那么还是首先来介绍一下FOR XML PATH ,假设现... 阅读全文

posted @ 2015-08-10 17:19 chengjunde 阅读(195) 评论(0) 推荐(0)

SQL Server中使用convert进行日期转换
摘要:使用 CONVERT:CONVERT (data_type[(length)],expression[,style])参数expression是任何有效的 Microsoft® SQL Server™ 表达式。data_type目标系统所提供的数据类型,包括bigint和sql_variant。不能... 阅读全文

posted @ 2015-07-10 14:07 chengjunde 阅读(225) 评论(0) 推荐(0)

sqlserver表分区与调优与行列转换
摘要:转自: http://www.cnblogs.com/knowledgesea/p/3696912.html http://www.open-open.com/lib/view/open1418462880292.html http://blog.jobbole.com/55086/ http:// 阅读全文

posted @ 2015-06-12 17:25 chengjunde 阅读(244) 评论(0) 推荐(0)

update多表更新的2种方式
摘要:update t1 set TermBeginQty =isnull((select top 1 JiaoPlusQty from WMS_RptMaterialPutDaily r where t1.MO=r.MO and (t1.MouldNO = r.MouldNO o... 阅读全文

posted @ 2015-06-05 08:57 chengjunde 阅读(457) 评论(0) 推荐(0)

SQL自定义函数split分隔字符串
摘要:SQL自定义函数split分隔字符串一、F_Split:分割字符串拆分为数据表Create FUNCTION [dbo].[F_Split] ( @SplitString nvarchar(max), --源字符串 @Separator nvarchar(10)=' ' --分隔... 阅读全文

posted @ 2015-05-28 19:23 chengjunde 阅读(798) 评论(0) 推荐(0)

MongoDB学习笔记(一) MongoDB介绍及安装
摘要:转自:http://database.51cto.com/art/201103/247882.htmhttp://baike.baidu.com/link?url=b6B3dVSCnQauCX-Epz4UCy9mTZ07Z6HwnaPbZsb130F2y1KsdxIppForCkxbdjP3Bk3B... 阅读全文

posted @ 2015-05-21 17:24 chengjunde 阅读(182) 评论(0) 推荐(0)

导航