• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Pls Help..Triggers

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"cool again " please see your private messages for an important administrative matter.
 
Aman Gupta
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Amit.I have updated the details.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which database are you using?
 
Amit Ghorpade
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the update
 
I'm still in control here. LOOK at this tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic