摘要:
Som有时候我们需要为表设置别名,这样就可以方便的修改表。如果在SSMS中,可以点击Query-> SQL CMD mode--Set Alisa for the table:setvar tablename "[RetailDataWarehouse].[dbo].[FactUnit]" Select ExternalOrderId,COUNT(DISTINCT(RetailTransactionId)) AS IDCountinto #X--Use as a variableFrom $(tablename) group by ExternalOrderId 阅读全文
摘要:
--删除表 如果已经存在USE master--检查是否已经存在一个表,如果有就删除IF(EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '#Op_Table;')) DROP table #Op_Table;GO--检查是否已经存在一个临时表,如果有就删除IF(OBJECT_ID(N'tempdb..#Op_Table')) is not null DROP TABLE #Op_TableGO----检查是否已经存在一个临时表,如果有就删除--IF(EXISTS(SELECT 阅读全文
摘要:
USE master--检查是否已经存在一个表,如果有就删除IF(EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '#New_Table')) DROP table #New_TableGO--创建临时表CREATE TABLE #New_Table( ID int not null identity(1,1) primary key, Name nvarchar(50) not null, Age int not null)--向表中插入数据INSERT INTO #New_Table (Na 阅读全文
摘要:
有时候我们需要动态的将View中的值post 到Controller中做一定的处理,比如ToolTip,下面是JQuery代码: $(document).ready(function () { var title = "" var toolTip = $("<p id=\"toolTipCss\"></p>") $(".Branch").bind("mouseover mouseout", function (event) { if (event.target.class 阅读全文
摘要:
今天熟悉了下F# 中使用WebBroswer控件, 代码如下:// Learn more about F# at http://fsharp.net// See the 'F# Tutorial' project for more help.open System.Windows.Formsopen Systemopen System.Xmlopen System.Netopen System.Webopen HtmlAgilityPackopen System.IOlet asyncGrapUrl(newUrl : string) = async{ ... 阅读全文