修改人员入职日期

by 刘强亚 2016.1.11 14:38

注:脚本执行有风险,对于客户正式环境请在研发指导下执行。

--修改人员入职日期需提供三个参数,如下所示:

declare @PersonID VARCHAR(50)
declare @PersonName VARCHAR(50)
declare @NewEntranceDate DateTime
set @PersonID = '1215454534545' --证件号码
set @PersonName = '玉姣龙' --姓名
set @NewEntranceDate = '2011-01-1' --要调整到的日期(只能往后调,比如当前入职日期为2011.1.1号,调整日期必须比这个时间小)

if(
(select Count(ID) from CBO_HRAttachRelation
where Person =
(select ID from CBO_Person where PersonID = @PersonID and Name = @PersonName))=1
and
(cast(@NewEntranceDate as datetime) >=
(select OccupationDate from CBO_Person where PersonID = @PersonID and Name = @PersonName))
)
update CBO_HRAttachRelation
set StartDate = @NewEntranceDate
where Person =
(select ID from CBO_Person where PersonID = @PersonID and Name = @PersonName)

执行上述sql之后即可在portal中修改员工人员入职日期,且入职日期不能小于@NewEntranceDate

 

Tags:

评论 (11) -

The hill For tipsters, 美国 wrote at 2020/2/10 3:24:43 #

Fantastic beat ! I would like to apprentice while you amend your site, how can i subscribe for a blog site? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear concept  Also visit my blog post:  The hill For tipsters, - https://www.tipsterhill.com/

this site 美国 wrote at 2020/2/24 22:20:38 #

My coder is trying to convince me to move to .net from PHP. I have always disliked the idea because of the expenses. But he's tryiong none the less. I've been using Movable-type on various websites for about a year and am concerned about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can transfer all my wordpress content into it? Any kind of help would be really appreciated!  Feel free to surf to my webpage:  this site - http://footballpredictionsites.mystrikingly.com

racing tipsters 美国 wrote at 2020/3/6 2:14:16 #

My partner and I stumbled over here by a different web page and thought I might as well check things out. I like what I see so i am just following you. Look forward to looking into your web page repeatedly.  Feel free to visit my web blog -  racing tipsters - www.informationweek.com/profile.asp

another Review here, 美国 wrote at 2020/3/7 7:02:57 #

Great article.  Take a look at my web blog ::  another Review here, - https://easybettingsystem.wordpress.com/

visit this betting gods review 美国 wrote at 2020/3/7 7:48:34 #

I was wondering if you ever thought of changing the layout of your site? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having one or two pictures. Maybe you could space it out better?  Here is my web-site -  visit this betting gods review - bettinggods.review-blogger.com/.../betting-gods-review

accurate football prediction website 美国 wrote at 2020/3/7 21:19:21 #

I know this if off topic but I'm looking into starting my own weblog and was wondering what all is required to get setup? I'm assuming having a blog like yours would cost a pretty penny? I'm not very internet savvy so I'm not 100% sure. Any recommendations or advice would be greatly appreciated. Appreciate it  My site -  accurate football prediction website - https://issuhub.com/user/book/8633

review with Sports insider 美国 wrote at 2020/3/8 3:17:36 #

We stumbled over here  different web address and thought I should check things out. I like what I see so i am just following you. Look forward to finding out about your web page for a second time.  Visit my blog  review with Sports insider - www.rawpixel.com/bettingplat/community-boards

tips Horse Racing 美国 wrote at 2020/3/9 22:32:03 #

Great weblog here! Also your web site so much up fast! What web host are you the usage of? Can I get your affiliate link in your host? I wish my web site loaded up as quickly as yours lol  Also visit my site:  tips Horse Racing - www.tipsterhill.com/best-horse-racing-tipsters/

Gambling horoscope 美国 wrote at 2020/3/17 1:31:48 #

If you wish for to take a good deal from this piece of writing then you have to apply such methods to your won webpage.  My blog post:  Gambling horoscope - https://svenskacasino2018.wordpress.com/

casino bonus reports 美国 wrote at 2020/3/29 5:32:46 #

I think this is among the most important information for me. And i am happy studying your article. However want to statement on few basic issues, The site style is wonderful, the articles is in point of fact excellent : D. Excellent process, cheers  My blog post -  casino bonus reports - wecometoyouhomecleaning.com/.../

slot sites 美国 wrote at 2020/5/12 3:55:13 #

I really like what you guys tend to be up too. This sort of clever work and reporting! Keep up the awesome works guys I've  you guys to my blogroll.  Feel free to surf to my webpage -  slot sites - https://www.bestslotsites.eu/

添加评论



biuquote
微笑得意调皮害羞酷大笑惊讶发呆喜欢可怜尴尬闭嘴噘嘴皱眉伤心抓狂呕吐坏笑漫骂发怒
Loading


RecentComments

评论 RSS

Statistics

989 篇文章
0 个单页
787053 条评论
11 次评分
1380107 次访问
访问统计开始于 2019年12月15日
平均日访问 6832 次
当前 119 人在线