日期:2011-01-25 23:11:00 来源:本站整理
SQL中if语句的用法示例[MSSQL防范]
本文“SQL中if语句的用法示例[MSSQL防范]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
SQL中if语句是最常见也是最常用的SQL语句之一,下面就将为您举例阐明SQL中if语句的用法,但愿对您学习SQL中if语句的利用可以有些许帮忙.
<
- _sql = " if not exists (select * from ProDesignSheet5 where Sheet5ID = '" + this.Sheet5id + "') "
- + " insert into ProDesignSheet5 values('" + this.Sheet5id
- + "','" + this.Consplacepbfee.ToString()
- + "','" + this.Searchtestfee.ToString()
- + "','" + this.Ccdesignfee.ToString()
- + "','" + this.Propreparefee.ToString()
- + "','" + this.Elecfee.ToString()
- + "','" + this.Workerdqfee.ToString()
- + "','" + this.Cjzpgdqfee.ToString()
- + "','" + this.Dxsgjxdqfee.ToString()
- + "','" + this.Debzglfee.ToString()
- + "','" + this.Jsqtzdkrate.ToString()
- + "','" + this.Gczljdfee.ToString()
- + "','" + this.Yuntufee.ToString()
- + "','" + this.Jfgzjgzfee.ToString()
- + "','" + this.Wsdyrfee.ToString()
- + "','" + this.Whclfee.ToString()
- + "','" + this.Bgyffee.ToString()
- + "','" + this.Yytfee.ToString()
- + "','" + this.Hlhtfee.ToString()
- + "','" + this.Jfxtfee.ToString()
- + "','" + this.Ybgjfee.ToString()
- + "','" + this.Gxzfzfee.ToString()
- + "','" + this.Lyglfee.ToString()
- + "','" + this.Jfzjfee.ToString()
- + "','" + this.Gdzjfee.ToString()
- + "','" + this.Gdlxlzjfee.ToString()
- + "','" + this.Workteamfee.ToString()
- + "','" + this.Condeptfee.ToString()
- + "','" + this.Tower.ToString()
- + "','" + this.Servicefee.ToString()
- + "','" + this.Checkfee.ToString()
- + "','" + this.Other.ToString()
- + "','" + this.ItemNum.ToString()
- + "','" + this.ItemName.ToString()
- + "','" + this.PassId.ToString()
- + "')"
- + " else update ProDesignSheet5 set Consplacepbfee='" + this.Consplacepbfee.ToString()
- + "',Searchtestfee='" + this.Searchtestfee.ToString()
- + "',Ccdesignfee='" + this.Ccdesignfee.ToString()
- + "',Propreparefee='" + this.Propreparefee.ToString()
- + "',Elecfee='" + this.Elecfee.ToString()
- + "',Workerdqfee='" + this.Workerdqfee.ToString()
- + "',Cjzpgdqfee='" + this.Cjzpgdqfee.ToString()
- + "',Dxsgjxdqfee='" + this.Dxsgjxdqfee.ToString()
- + "',Debzglfee='" + this.Debzglfee.ToString()
- + "',Jsqtzdkrate='" + this.Jsqtzdkrate.ToString()
- + "',Gczljdfee='" + this.Gczljdfee.ToString()
- + "',Yuntufee='" + this.Yuntufee.ToString()
- + "',Jfgzjgzfee='" + this.Jfgzjgzfee.ToString()
- + "',Wsdyrfee='" + this.Wsdyrfee.ToString()
- + "',Whclfee='" + this.Whclfee.ToString()
- + "',Bgyffee='" + this.Bgyffee.ToString()
- + "',Yytfee='" + this.Yytfee.ToString()
- + "',Hlhtfee='" + this.Hlhtfee.ToString()
- + "',Jfxtfee='" + this.Jfxtfee.ToString()
- + "',Ybgjfee='" + this.Ybgjfee.ToString()
- + "',Gxzfzfee='" + this.Gxzfzfee.ToString()
- + "',Lyglfee='" + this.Lyglfee.ToString()
- + "',Jfzjfee='" + this.Jfzjfee.ToString()
- + "',Gdzjfee='" + this.Gdzjfee.ToString()
- + "',Gdlxlzjfee='" + this.Gdlxlzjfee.ToString()
- + "',Workteamfee='" + this.Workteamfee.ToString()
- + "',Condeptfee='" + this.Condeptfee.ToString()
- + "',Tower='" + this.Tower.ToString()
- + "',Servicefee='" + this.Servicefee.ToString()
- + "',Checkfee='" + this.Checkfee.ToString()
- + "',Other='" + this.Other.ToString()
- //+ "',ItemNum='" + this.ItemNum.ToString()
- //+ "',ItemName='" + this.ItemName.ToString()
- //+ "',PassId='" + this.PassId.ToString()
- + "' where Sheet5id ='" + this.Sheet5id + "'";
以上是“SQL中if语句的用法示例[MSSQL防范]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |
评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论