Create a indeterminate relationship in access using sql

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
 
J

John Nurick

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.
 
J

John Vinson

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top