OK I am back. After geting my TRIP_DETAIL table created now I am having problems creating the relationships, and FK's, and by the way I am using sql express 2008. I reading about Primary Key, and Foreign keys I still can not get what I need. So I removed all Primary Keys from my TRIP and TRIP_DETAIL tables. Here is my tables:
So I need a one to many relationship. Just a reminder I have lots of data in each table, and I am learning.
TRIPS(Table Columns): ONE TABLE
TRIP (int, not null) "THIS NEED TO BE PRIMARY KEY"
TRIP_DATE (data null)
MONTH (nvarchar(8), null)
BOOK (nvarchar(10), null)
R_T_F (nvarchar(5), null)
TRIP_DESC(nvarchar(50), null)
TRIP_COMT(nvarchar(50), null)
LIFT(nvarchar(5), null)
TCC(nvarchar(5), null)
LEG(nvarchar(5), null)
PASS((int, null)
CRN((int, null)
WCP(nvarchar(3), null
TRIP_NO(nvarchar(12, null)
CODE(nvarchar(10, null)
NEW_RIDER(nvarchar(5, null)
TRIP_DETAILS(Table Columns): MANY TABLE
TD_NUM (int, not null) "DOSE THIS NEED TO BE PRIMARY KEY ?"
TRIP (int, not null) "DOSE THIS NEEDS TO BE FK FROM TRIPS TABLE ?"
RIDER_NO (int, not null)
LNAME (nvarchar(20), null)
FNAME (nvarchar(20, null)
PROV_CON(int, null)
APT_TIME(time(7), null)
PKUP_TIME(time(7), null)
TD_REMARKS(nvarchar(20), null)
NEW_RIDER(nvarchar(5), null)
SORT(nvarchar(4), null)
HOW DO I DO THIS I AM SO LOST. I AM USING SQL SERVER EXPRESS 2008