You must have a primary key on DRINFO before you can apply the FK on the temp table. I just tested, and I can apply the FK from the table designer, but get the same error message when I try to create it at the R> prompt.

MDRD wrote:
Hi
Can you have a FK on a Temp Table?
 ALTER TABLE `tran_spd` ADD FOREIGN KEY ( `treat_dr` ) +
 REFERENCES `DRINFO`
I keep getting an error "referenced table does not exists.."
Thanks
Marc

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================


Reply via email to