09 2012 档案
摘要:--聚合函数usepubsgoselectavg(distinctprice)--算平均数fromtitleswheretype='business'gousepubsgoselectmax(ytd_sales)--最大数fromtitlesgousepubsgoselectmin(ytd_sales)--最小数fromtitlesgousepubsgoselecttype,sum(price),sum(advance)--求和fromtitlesgroupbytypeorderbytypegousepubsgoselectcount(distinctcity)--求个数fro
阅读全文
摘要:select SizeType,[Description],[USA],[CH],row_number() over( partition by [SizeType], [Description] order by [CH] asc )as Seq from M_SizeDetail
阅读全文
摘要:我这里主要用到了文件的复制方法string SavesUPLoadPath = ConfigurationManager.AppSettings["AWUploadLocation"] + CompanyName + "/"; string copySavesUPLoadPath = ConfigurationManager.AppSettings["AWUploadLocation"] + CompanyName + "/"; if (!Directory.Exists(SavesUPLoadPath))//判断
阅读全文
摘要:平时的项目开发中,分页存储过程是用的比较多的存储过程,SqlServer分页存储过程中经常要用到top,Oracle中则经常用到了RowNum. 现在,有一个UserInfo表,一个字段是UserId,另一个字段是UserName,其中是UserId是自动增长的,步长是1.表中共有30条数据,其中UserId的值不一定是连续的。现在要实现的目的是取其中的第11至第20条记录。先看SqlServer的几种做法: 第一种写法:selecttop10*fromUserInfowhereUserIdin(selecttop20UserIdfromUserInfo)orderbyUserIddes...
阅读全文
摘要:USE [BooksBrothersWebOrder]GO/****** Object: StoredProcedure [dbo].[sp_GetUserRightsByCustID] Script Date: 09/19/2012 14:46:34 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO/*Name: dbo.sp_GetUserRightsByCustID Description: --取得指定Cust的相关权限Parameters: @CustID VARCHAR(10)Return Values: Ref. Table
阅读全文
摘要://第一级联动 jQuery(function(){ jQuery("#ddlCountry").change(function(){ if(jQuery(this).val()=='COO03') //表示为中国 { jQuery("#ddlProvince").attr("disabled", false); var url =...
阅读全文
摘要:前台jQuery(function(){ jQuery("#ddlSizeCode").change(function(){ //alert('123'); var url = 'SizeLabel.aspx' + "?rand=" + Math.random()+"&sval="+jQuery(this).val(); var str = "dropdowselect"; ...
阅读全文
摘要:ALTER proc [dbo].[SP_User_Login]( @UserName varchar(20), @UserPwd varchar(20) )as declare @User_Login_row int --用户登录影响的行数 @UserNam是主键 declare @Leve int---得到用户登录级别 0为管理员 1 超级用户 2 一般用户 begin set @User_Login_row=(select count(*) from [User] where UserName=@UserName and UserPwd=@UserPwd and [State]=1) .
阅读全文