Why not put the foreign key in Appt_2, then
SELECT ...
FROM
Appt_1
LEFT OUTER JOIN Appt_2 ON
Appt_1.DEcisionID = Appt_2 YourForeignKey
From the way you described the application, appt_2 is an extension
(or child) of appt_1
The above is a clean wau to handle that relationship and take
advantage of the referential integrity provided by the db.
HTH
Dick
At 11:02 AM -0500 6/18/01, Julie Clegg wrote:
>I have 2 tables - tblAppointment_1 and tblAppointment_2. I want to set up a
>foreign key in appointment_1 to connect it to Appointment_2. My question
>is, if the Appointment_1 record is created a few weeks before Appointment_2,
>will this be a problem because the foreign key will be null for a period of
>time? ie...appt_1 record is created first. Then, after some time, Appt_2
>record is created and appt_1 record is updated(inserting the CASACID).
>
>Appt_1 Appt_2
>-------- ------------
>DEcisionID(PrimaryKey) CasacID(PrimaryKey)
>date date
>firstname outcome
>lastname
>CASACID(ForeighKey)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists