Beruflich Dokumente
Kultur Dokumente
6.02
1. In order to update tblCity with the appropriate information we ran the following scripts
INSERT INTO tblCity (Name, Country, Population, Description, Mayor, Website)
VALUES ('Bradford on Avon', 'England', 9326, 'Bradford on Avon (BOA) is a town in west
Wiltshire,
England with a population of about 9,326. It is the smallest of the five town''s in West
Wiltshire.
The towns canal, historic buildings, shops, pubs and restaurants make it popular with
tourists.', 'Peter Leach',
'http://www.bradfordonavontown.com/')
6.03
2. In order to update the tblCommittee with the new information we ran the following scripts
INSERT INTO tblCommittee (CommitteeType, CommitteeName, MonthlyMeetingTime,
BudgetedExpenditures, ExpendituresToDate)
VALUES ('C', 'Bradford on Avon', '2nd Friday 2 PM', 500, 50)
INSERT INTO tblSisterCityCommittee (CommitteeID, CityID)
VALUES (29, 7)
UPDATE tblSisterCityCommittee
SET TopProject = 'Explore the possibility of a relationship between BOA and your SCA'
WHERE CommitteeID = 29
UPDATE tblSisterCityCommittee
SET MostRecentVisitToCity = '2004-08-12'
WHERE CommitteeID = 29
UPDATE tblSisterCityCommittee
SET AffiliatedCity = 'Bradford on Avon'
WHERE CommitteeID = 29
6.04
INSERT INTO tblCommittee (CommitteeType, CommitteeName, MonthlyMeetingTime,
BudgetedExpenditures, ExpendituresToDate)
VALUES ('S', 'Programs', '3rd Friday 7 PM', 500, 50)
6.05
INSERT INTO tblCommittee (CommitteeType, CommitteeName, MonthlyMeetingTime,
BudgetedExpenditures, ExpendituresToDate)
SELECT DISTINCT
PositionName
FROM zOfficers;
ALTER TABLE zOfficers
ADD PositionID int
UPDATE zOfficers
SET PositionID = 8 WHERE PositionName = 'Treasurer'
ALTER TABLE zOfficers
ADD PersonID int
UPDATE zOfficers
SET PersonID = tblPerson.PersonID
FROM tblPerson
WHERE zOfficers.FirstName = tblPerson.FirstName
AND zOfficers.LastName = tblPerson.LastName
UPDATE tblServiceHistory
SET PositionID = zOfficers.PositionID
FROM zOfficers
WHERE tblServiceHistory.PersonID = zOfficers.PersonID
INSERT INTO tblAuthCommPosit (CommitteeID, PositionID)
SELECT CommitteeID, PositionID
FROM zOfficers
WHERE zOfficers.AuthCommPositID is not NULL
ALTER TABLE zOfficers
ADD AuthCommPositID int
UPDATE zOfficers
SET AuthCommPositID = 8 WHERE PositionName = 'Treasurer'
UPDATE tblAuthCommPosit
SET AuthCommPositID = zOfficers.AuthCommPositID
FROM zOfficers
WHERE tblAuthCommPosit.CommitteeID = zOfficers.CommitteeID
AND tblAuthCommPosit.PositionID = zOfficers.PositionID
INSERT INTO tblPerson (FirstName, MidName, LastName)
SELECT DISTINCT FirstName, MidName, LastName
FROM zOfficers