Create a indeterminate relationship in access using sql

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am stuck using a database with no primary keys. :( I have two tables
that both have the same field name and datatype. Using Access, in the
relationships design, I can create an indeterminate relationship with the two
tables. However, since I do not have access to clients database, I have to
write code to create this realationship using SQL. Does anyone know how to
create an indeterminate relationship using a SQL statement.

I have used the following with keys and it of cource works great.:
ALTER TABLE tblOne ADD CONSTRAINT FK_Name
FOREIGN KEY (ID) REFERENCES tblTwo (ID)

Thanks in advance.
Dolph
 
Hi Dolph,

If I understand right, the only thing an indeterminate relationship does
is produce a line in the Relationships window: it doesn't impose any
actual constraint. So don't bother trying to create them, just join the
tables in your queries as you need.
 
Does anyone know how to
create an indeterminate relationship using a SQL statement.

<puzzlement>

Why? What benefit does an unenforced, indeterminate relationship
provide?

I'd be inclined to create the relationship using VBA on the object
model instead, if I were to do it at all.

John W. Vinson[MVP]
 
Back
Top