ok here is a question. to my knowledge this is how you do a view in sql, im using oracle.
CREATE VIEW myviewname
SELECT the fields i want to show
FROM the tables they are in
WHERE something equals something
imagine this scenario:
i have 3 tables. a table holding details of a campaign such as start date, end date campaign id... a table holding details of the campaign team (who is working on it, using staffids and which campaign it's for using campaignid) and a table with the staff details(including the staffid and name surname...)
My tables are made and the primary keys are set.
the tables are linked like this
CAMPAIGN to CTEAM using CampaignId
CTEAM to STAFF using StaffId
CAMPAIGN table
CampaignName,StartDate,EndDate
CTEAM table
CManager, Contact1, Contact2, PurchasingAst
STAFF table
Forname,Surname,Position,TelNumber
what i need to know is how to structure the view in order to show details from all the dif tables?
CREATE VIEW myviewname
SELECT the fields i want to show
FROM the tables they are in
WHERE something equals something
imagine this scenario:
i have 3 tables. a table holding details of a campaign such as start date, end date campaign id... a table holding details of the campaign team (who is working on it, using staffids and which campaign it's for using campaignid) and a table with the staff details(including the staffid and name surname...)
My tables are made and the primary keys are set.
the tables are linked like this
CAMPAIGN to CTEAM using CampaignId
CTEAM to STAFF using StaffId
CAMPAIGN table
CampaignName,StartDate,EndDate
CTEAM table
CManager, Contact1, Contact2, PurchasingAst
STAFF table
Forname,Surname,Position,TelNumber
what i need to know is how to structure the view in order to show details from all the dif tables?