Prev: data checking
Next: What are AutoNumber Dangers
From: gm via AccessMonster.com on 28 Apr 2010 16:02 I have an Access data base that has acumulated 7 years of HR info. We plan to moving this info to HR Application. The new application has a field called [EmpStat}. On my access data base I do not have a [EMPStat] field but I do have a [Termation date]. Because we have a lot of employees that have terminated it would be great to import into the HR program the word "Terminated" into [EMPStat]. How can I do the following in a table: create a new column and call it [empstat] then say If [Termination Date] Is Not Null put "Terminated" in the [empstat] field. If I'm able to do this it would eliviate a lot of manual labor Thanks GM -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-tablesdbdesign/201004/1
From: XPS350 on 28 Apr 2010 16:12 On 28 apr, 22:02, "gm via AccessMonster.com" <u49152(a)uwe> wrote: > I have an Access data base that has acumulated 7 years of HR info. We plan to > moving this info > to HR Application. The new application has a field called [EmpStat}. > > On my access data base I do not have a [EMPStat] field but I do have a > [Termation date]. > > Because we have a lot of employees that have terminated it would be great to > import into > the HR program the word "Terminated" into [EMPStat]. > > How can I do the following in a table: create a new column and call it > [empstat] then say > > If [Termination Date] Is Not Null put "Terminated" in the [empstat] field. > > If I'm able to do this it would eliviate a lot of manual labor > > Thanks > > GM > > -- > Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-tablesdbdesign/20... After you added the EmpStat field you can run a query like: UPDATE YourTabel SET EmpStat="Terminated" WHERE NOT IsNull([Termination Date]) Groeten, Peter http://access.xps350.com
From: John W. Vinson on 28 Apr 2010 20:54 On Wed, 28 Apr 2010 20:02:11 GMT, "gm via AccessMonster.com" <u49152(a)uwe> wrote: >I have an Access data base that has acumulated 7 years of HR info. We plan to >moving this info >to HR Application. The new application has a field called [EmpStat}. > >On my access data base I do not have a [EMPStat] field but I do have a >[Termation date]. > >Because we have a lot of employees that have terminated it would be great to >import into >the HR program the word "Terminated" into [EMPStat]. > >How can I do the following in a table: create a new column and call it >[empstat] then say > >If [Termination Date] Is Not Null put "Terminated" in the [empstat] field. > >If I'm able to do this it would eliviate a lot of manual labor > >Thanks > >GM A very simple update query will do this. Create a new Query based on your table; select the [Termination Date] and EMPStat fields. Put a criterion of IS NOT NULL on [Termination Date], and IS NULL on EMPStat (just in case, so you don't destroy existing data). Change the query to an Update query using the Query menu item or the query type tool, and put "Terminated" on the Update To line under EmpStat. Run the query with the ! icon. -- John W. Vinson [MVP]
From: Gopb via AccessMonster.com on 30 Apr 2010 08:53 Thanks for the quick responce. It did the trick GM John W. Vinson wrote: >>I have an Access data base that has acumulated 7 years of HR info. We plan to >>moving this info >[quoted text clipped - 17 lines] >> >>GM > >A very simple update query will do this. Create a new Query based on your >table; select the [Termination Date] and EMPStat fields. > >Put a criterion of > >IS NOT NULL > >on [Termination Date], and > >IS NULL > >on EMPStat (just in case, so you don't destroy existing data). > >Change the query to an Update query using the Query menu item or the query >type tool, and put > >"Terminated" > >on the Update To line under EmpStat. Run the query with the ! icon. -- Message posted via http://www.accessmonster.com
|
Pages: 1 Prev: data checking Next: What are AutoNumber Dangers |