Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 22nd, 2004, 02:43 AM
YuLing YuLing is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 44 YuLing User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to YuLing
Update column value??

Hi...

First I'll like to thanks everyone that took their time to try and help me out so far..especially to shafique..thank you all.

Okie..now back to my question..I've got this problem which i m not sure whether can be done or not.

|-Emp_id-|Full_name|Join_date|Plant_id|Plant_name|-Status|
|--001---|--ABCD--|1/1/2004|--A001-|-----A-----|Transfer|
|--002---|--BCDE--|1/2/2004|--A002-|-----A-----|-NULL--|
|--003---|--ABCD--|1/4/2004|--B001-|-----B-----|-NULL--|
This table keep information bout employee transfer.

For example, employee name ABCD start joining the company at 1/1/2004 at plant with Plant_id A001 and was given an Emp_id 001. Then he was transfer to plant B001 and then given another different emp_id 003...if status id Transfer means that the employee have been transfer to another plant.

|-Emp_id-|Worktime|Workdate|-OT-|Plant_name|
|--001---|----8----|1/1/2004|--1-|-----A-----|
|--001---|----8----|2/1/2004|--0-|-----A-----|
.
.
|--001---|----8----|31/3/2004|-0-|-----A-----|
|--002---|----8----|1/2/2004|--2-|-----A-----|
.
.
|--003---|----8----|1/4/2004|--1-|-----B-----|
.
.
This 2nd table keep information bout employee working time.

I need to do some sort of a summary for an employee overall Worktime and OT records in the company, so need to have a common Emp_id to be able to extract those info bout the employee.

Thats y i need to be able to do something like this....
1) Find from the first table to see whether the person have a transfer or not
2) If got transfer, find with the same full_name and from status if got TRANSFER means is the old emp_id and the latest Emp_id for that employee is the one where status is NULL (eg: 001 is the old emp_id cos status is transfer which means 003 should be the latest emp_id)...then in the 2nd table, i need to rewrite/update the latest Emp_id and Plant_name in the 2nd table

To something like this
|-Emp_id-|Worktime|Workdate|-OT-|Plant_name|
|--003---|----8----|1/1/2004|--1-|-----B-----|
|--003---|----8----|2/1/2004|--0-|-----B-----|
.
.
|--003---|----8----|31/3/2004|-0-|-----B-----|
|--002---|----8----|1/2/2004|--2-|-----A-----|
.
.
|--003---|----8----|1/4/2004|--1-|-----B-----|
.
.

Hope this question wont sound weird and funny

Thanks in advance.


regards
YuLing

Last edited by YuLing : April 22nd, 2004 at 04:04 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Update column value??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway