have you tried adding it in the table designer?

----- Original Message ----- From: "MDRD" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Tuesday, March 16, 2010 8:19 AM
Subject: [RBASE-L] - Re: Temp Tables


Hi Rachael

I thought that too but the second FK fails. Also, I did Unload the structure of the Hist table then change the table name but it still fails when trying to add FK's on Temp Tables.

Thanks
Marc


--------------------------------------------------
From: "Rachael Malberg" <[email protected]>
Sent: Tuesday, March 16, 2010 7:38 AM
To: "RBASE-L Mailing List" <[email protected]>
Subject: [RBASE-L] - Re: Temp Tables

try adding it in the table designer then unload the table structure to get the code. I think you need the 'cannot insert...' messages but not 100% on this.
It is something like...

ALTER TABLE `tran_spd` ADD FOREIGN KEY +
( `treat_dr` )+
REFERENCES `DRINFO` +
('Cannot insert - value does not exist in DRINFO',+
'Cannot update - value does not exist in DRINFO')

----- Original Message ----- From: "Albert Berry" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Tuesday, March 16, 2010 1:57 AM
Subject: [RBASE-L] - Re: Temp Tables


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









Reply via email to