INSERT INTO joint problem
Posted on 2000-04-02
I'm fairly new to db design, therefore this questions:
I have (among others) three tables:
(ProjectID, Name, etc.)
tblTeamMembersxProjects (joint table)
(TeamMemberID, FirstName, LastName, etc.)
Now, I have an asp page where one can add/edit project information. That page has a select list included that shows ALL possible TeamMembers pulled from tblTeamMembers (if it's an update then the TeamMembers associated with the project are already highlighted). Right now, if one enters a NEW project and selects some TeamMembers on that list I am running two separate conn.execute(sql) commands: one for the insertion of the project and the other to insert the TeamMembers from the list into the joint table.
This solution sounds like a fairly dirty solution to me. Is it possible to utilize the JOIN command in INSERT & UPDATE commands...???
I tried to find info on other sites (such as sql-zone.com or informit.com) but have not found anything concerning that specific question...
Thanx a bundle!