工作log

[ 2008-07-13 02:58:48 | Author: zhenhua ]
Font Size: Large | Medium | Small
存储过程还不会写 [evil]
3条sql搞定了,仅作记录
/*重命名*/
update t_xmgl_xm a,t_khgl_khzl b,t_xt_dm c set a.xmmc=concat('2008年',b.khmc,c.mc,'1') where c.lx=4 and a.khids is null and a.khid=b.khzlid and a.xmlxdm=c.dm and a.xmmc not like '%个人项目%';
/*查询重复*/
select cjrq,jzrq,xmmc,xmlxdm,khid from t_xmgl_xm a where (a.xmlxdm,a.khid) in (select xmlxdm,khid from t_xmgl_xm group by xmlxdm,khid having count(*) > 1) order by xmlxdm,khid,cjrq;
/*设置标记*/
update t_xmgl_xm set xmms = concat('(原项目名称:',oldxmmc,')',xmms) where xmmc not like '%个人项目%' and khids is null;

Comments Feed Comments Feed: http://www.zhenhua.org/feed.asp?q=comment&id=580
UTF-8 Encoding Trackback URL: http://www.zhenhua.org/trackback.asp?id=580

There is no comment on this article.

If you feel this site you find this information helpful, please click on the donation, which is voluntary,Thank you.
Post Comment
Smilies
[arrow] [biggrin] [confused] [cool]
[cry] [eek] [evil] [exclaim]
[frown] [idea] [lol] [mad]
[mrgreen] [neutral] [question] [razz]
[redface] [rolleyes] [sad] [smile]
[surprised] [twisted] [wink]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code