Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Pls Help..Triggers  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I did not create any SQL trigger or procedure before. What I need is that I have 6 tables as:
1- Parent1 [Employee]: EmpID (PK), EmpName ...etc.
2- Child1 [EmpCourse]: EmpID (FK), CourseName, ...etc
3- Child2 [EmpExperience]: EmpID (FK), ExperienceSource, ...etc.

4- CopyofParent1 [Employee]: EmpID (PK), EmpName ...etc.
5- CopyofChild1 [EmpCourse]: EmpID (FK), CourseName, ...etc
6- CopyofChild2 [EmpExperience]: EmpID (FK), ExperienceSource, ...etc.


CopyofParent1 columns is superset of Parent1 columns.
Similarly for CopyofChild1 and CopyofChild2.

As soon as a record in Parent1 is inserted and meets a certain criterion, the record shd be inserted in CopyofParent1 using EmpID .
At this time, records from Child1 and Child2 for the same Parent shd be inserted in CopyofChild1 and CopyofChild2 resp.


Please help.

Thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!