文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 经管营销 > sql字符串函数说明
侵权投诉

sql字符串函数说明

高中物理教学艺术

sql字符串函数说明.txt
死亡循环 淡定

如果有一天晚上,你从家里出去,你发现楼梯一直往下延伸,永远没有尽头,你永远找不到出口,你会怎么想?
爱情没有永恒,只有彼此的慰藉和责任。

{0:P}百分号格式化字符串
A brother is only a fame//legend哥只是个传说
CREATE PROCEDURE proc_parameterNumber
@SingleNumberId varchar(10),
@SingleNumber varchar(10) output
AS
BEGIN
if not exists (select * from SingleNumber where SingleNumberId=@SingleNumberId)
begin
set @SingleNumber=''
return
end
else
begin
declare @Prefixion varchar(10)
declare @Number bigint
declare @Width tinyint
select @Prefixion=Prefixion,@Number=Number,@Width=Width from SingleNumber where SingleNumberId=@SingleNumberId
update SingleNumber set Number=Number+1 where SingleNumberId=@SingleNumberId
declare @currentNumber varchar(100)
@currentNumber='00000000000000000000000'+@Number
set @SingleNumber=@currentNumber
end
END
GO


/// <summary>
/// 添加项目对应的课程
/// </summary>
/// <param name="courseIds">课程Id数组</param>
/// <param name="projectId">项目id</param>
public static void AddCourseSettings(int[] courseIds, string projectId)
{
SqlParameterList splist = new SqlParameterList();
splist.AddAParameter("@ProjectId", SqlDbType.Char, 8, projectId);
string strSql = "";
for (int i = 0; i < courseIds.Length; i++)
{
splist.AddAParameter("@CourseId" + i.ToString(), SqlDbType.Int, courseIds[i]);
strSql += string.Format(@"
if exists(select * from CourseSetting where ProjectId=@ProjectId and CourseId=@CourseId{0})
return;
else
insert into CourseSetting(ProjectId,CourseId) values (@ProjectId,@CourseId{0});
end", i);
DataAccessor.ExecuteSqlOnly(strSql, false, splist);
}
}







declare @PayAbleTuition int --应交费用
select @PayAbleTuition=PayAbleTuition from PayCondition where PayConditionId=1

if not exists (select TuitionId from Tuition where PayConditionId=1)
--预交 一次交清 保留 @TuitionAmount:当前所交费用
begin
if(@TuitionAmount<@PayAbleTuition)
select '预交'
else if(@TuitionAmount=@PayAbleTuition)
select '一次交清'
else
select '保留'
end
else
--补交 补齐 保留
begin
declare @PaidTuition int --已交费用
select @PaidTuition=sum(TuitionAmount) from Tuition where PayConditionId=1
if(@PaidTuition+@TuitionAmount<@PayAbleTuition)
select '补交'
else if(@PaidTuition+@TuitionAmount=@PayAbleTuition)
select '补齐'
else
select '保留'
end





winForm窗体中,快捷键是(&字母) 如:显示(&D) 则表示"显示"的快捷键是字母D


datediff(datepart,startTime,endTime)
说明:(endtime-starttime的结果转化为datepart)
该函数返回int类型
如:
select datediff(ss,'2010-4-14 10:30:20','2010-4-15 10:30

第1页

你可能喜欢

  • sql函数大全
  • 日期函数
  • Excel使用技巧大全(超
  • 森田疗法
  • 化工原理绪论
  • 无机化学答案
  • VLOOKUP函数

热门文档

相关文档

  • SQL字符串处理函数大全

    SQL Server 字符串处理函数大全 select 语句中只能使用 sql 函数对字段进行操作(链接 sql server), select 字段 1 from 表 1 where 字段 1.IndexOf("云")=1...

  • SQL字符串处理函数大全

    SQL字符串处理函数大全 - SQL2008 SQL2005 SQL2000 select语句中只能使用sql函数对字段进行操作(链接sql server), select 字段1 from 表1 where 字段1.IndexOf(...

  • SQL字符串函数大全

    SQL Server 字符串处理函数大全 select 语句中只能使用 sql 函数对字段进行操作(链接 sql server) , select 字段 1 from 表 1 where 字段 1.IndexOf("云")=...

  • SQL-SEVER字符串函数大全

    SQL Server 字符串处理函数大全 select 语句中只能使用 sql 函数对字段进行操作(... sql字符串函数说明 11页 免费 SQL中常用字符操作函数 6页 免费...

  • sql字符串函数说明

    sql字符串函数说明sql字符串函数说明隐藏>> 死亡循环 淡定 如果有一天晚上,你从家里出去,你发现楼梯一直往下延伸,永远没有尽头,你永远找不到 出口,你会怎么想?...

  • sql语句--字符串函数

    sql语句--字符串函数_IT/计算机_专业资料。sql语句字符串处理大全 select语句中只能使用sql函数对字段进行操作(链接sql server), select 字段1 from 表1 where ...

  • SQL函数说明文档很详细

    SQL 函数说明大全一旦成功地从表中检索出数据,就需要进一步操纵这些数据,以获得...数学函数 元数据函数 排名函数 行集函数 安全函数 字符串函数 系统函数 系统...

  • SQL SERVER 字符串函数大全

    SQL SERVER 字符串函数大全 /* 字符函数 */ /* 返回字符表达式中最左侧字符的 ASCII 代码值 */ --a:97,A:65 select Ascii('a') --a:97,A:65 /* ...

  • SQL中的字符串函数

    SQL中的字符串函数_计算机软件及应用_IT/计算机_专业资料。SQL中的字符串函数... sql字符串函数说明 11页 免费 实现SQL Server中的切割... 3页 免费 sql中...

  • SQL字符串操作函数

    sql字符串函数说明 11页 免费喜欢此文档的还喜欢 SQL函数大全 4页 免费 SQL查询语句大全集锦 33页 免费 SQL语句 日期函数详解与应... 6页 免费 常用比较日期...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email