Hi All
I have a table TblRDs that stores Requirements and Deliverables for a team. So it stored a unique id RDNo, the TeamRefNo that Requirement of Deliverable is associated with, A flag RD which will show whether it is a Reqirement or a Deliverable, the details of the Req/Del RDDetail and finaly a flag to indicate if it is still current or redundant.
This has a link into TblChecklist which in turn links into other tables.
In my application the users selects the teams required for a particular project. These are identified as Integers that are concactanated into a single field TeamsReq in TblTeamsRqd.
I have a piece of code taht takes this single field and breaks it up into an array of team numbers
For each TeamRefNo in the array I have a query that will add a row into TblChecklist for each RDNo associated with a particular TeamRefNo for that particular project.
This works great.
Now if we need to remove a team from a particular project, I nead a delete query. This is where I'm having problems.
I need to work out a query that will delete all the rows in TblChecklist with RDNo that are associated to a given TeamRefNo for a particular ProjectID.
I am fairly sure that because of the relational links once an RDNo is deleted from TBlChecklist the corresponding RDid will cause the appropriate rows to be deleted from TblUpdatesC, TblUpdateD and TblUpdateL. These deletions will inturn delete the appropriate rows from TblIssuesD, TblSHDev, TblIssuesC, TblSHClone, TblIssuesL and TblSHLive.
I hope I've explained myself clearly and hope even more that someone can help me with my query construction. I'm do not have much experience in writing queries, I tend to use the design view and the change to sql view. But this time I've got in a total mess.
Thanks in Advance
The tables affected are....
TblTeamsRqd
ProjectID (PK)
TeamsRequired
TblChecklist
RDid (PK)
ProjectID (FK)
RDNo (FK)
TblRDs
RDNo (PK)
TeamRefNo (FK)
RD
RDDetail
Redundant
TblUpdatesD *
UidD (PK)
RDid (FK)
UpdatesD
TblIssuesD *
UidD (FK)
IssuesD
CompletedD
TblSHDev *
SHidD (PK)
UidD (FK)
SoftListD
HardListD
The last three tables also exist as
TblUpdatesC TblUpdateL
TblIssuesC TblIssuesC
TblSHClone TblSHLive
Once again thanks....
I have a table TblRDs that stores Requirements and Deliverables for a team. So it stored a unique id RDNo, the TeamRefNo that Requirement of Deliverable is associated with, A flag RD which will show whether it is a Reqirement or a Deliverable, the details of the Req/Del RDDetail and finaly a flag to indicate if it is still current or redundant.
This has a link into TblChecklist which in turn links into other tables.
In my application the users selects the teams required for a particular project. These are identified as Integers that are concactanated into a single field TeamsReq in TblTeamsRqd.
I have a piece of code taht takes this single field and breaks it up into an array of team numbers
For each TeamRefNo in the array I have a query that will add a row into TblChecklist for each RDNo associated with a particular TeamRefNo for that particular project.
This works great.
Now if we need to remove a team from a particular project, I nead a delete query. This is where I'm having problems.
I need to work out a query that will delete all the rows in TblChecklist with RDNo that are associated to a given TeamRefNo for a particular ProjectID.
I am fairly sure that because of the relational links once an RDNo is deleted from TBlChecklist the corresponding RDid will cause the appropriate rows to be deleted from TblUpdatesC, TblUpdateD and TblUpdateL. These deletions will inturn delete the appropriate rows from TblIssuesD, TblSHDev, TblIssuesC, TblSHClone, TblIssuesL and TblSHLive.
I hope I've explained myself clearly and hope even more that someone can help me with my query construction. I'm do not have much experience in writing queries, I tend to use the design view and the change to sql view. But this time I've got in a total mess.
Thanks in Advance
The tables affected are....
TblTeamsRqd
ProjectID (PK)
TeamsRequired
TblChecklist
RDid (PK)
ProjectID (FK)
RDNo (FK)
TblRDs
RDNo (PK)
TeamRefNo (FK)
RD
RDDetail
Redundant
TblUpdatesD *
UidD (PK)
RDid (FK)
UpdatesD
TblIssuesD *
UidD (FK)
IssuesD
CompletedD
TblSHDev *
SHidD (PK)
UidD (FK)
SoftListD
HardListD
The last three tables also exist as
TblUpdatesC TblUpdateL
TblIssuesC TblIssuesC
TblSHClone TblSHLive
Once again thanks....