473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

No unique index found for the reference field of the primary table."

jinalpatel
I am getting this error when I try to enforce referencial integrity from Harvest II table to tractsum table I have attached the relationship diagram. Please give me the hint about possibilities of situation why this error occurs?

Thanks
Attached Files
File Type: zip YWMM DB relationships.zip (85.8 KB, 948 views)
Apr 3 '09 #1

✓ answered by NeoPa

Your attachment doesn't show the details of the link, but I suspect you have no unique index specified for the fields [Property] & [Comp_Tract 1] (taken together as a composite key).

Must they be unique? If so, define the index and you should be able to proceed past that point I would guess.

6 26270
RuralGuy
375 Expert 256MB
Does the Harvest II table have a PrimaryKey field?
Apr 3 '09 #2
Yes primary key is Property. It is one to many relationship. One Property can have multiple tract_sum.
Apr 3 '09 #3
RuralGuy
375 Expert 256MB
Why are there two fields from the Harvest II table in the TractSum table? What is the DataType of these fields?
Apr 3 '09 #4
NeoPa
32,556 Expert Mod 16PB
Your attachment doesn't show the details of the link, but I suspect you have no unique index specified for the fields [Property] & [Comp_Tract 1] (taken together as a composite key).

Must they be unique? If so, define the index and you should be able to proceed past that point I would guess.
Apr 4 '09 #5
Thanks you much guys!!
I found that there was no unique index set up for both the primary (composite key - in the table properties) I set that property to yes(with no duplicates) and it gave me another error saying that there is duplicate data in the table. I removed the duplicate data and it allowed me to enforce referencial integrity..Although it is weired that I tried 2-3 time before and it didn't work but finally it works fine.
Thanks much!!
Apr 8 '09 #6
RuralGuy
375 Expert 256MB
Thanks for posting back with your success.
Apr 8 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: aj | last post by:
DB2 WSE 8.1 FP5 Red Hat AS 2.1 What is the difference between adding a unique constraint like: ALTER TABLE <SCHEMA>.<TABLE> ADD CONSTRAINT CC1131378283225 UNIQUE ( <COL1>) ; and adding a...
4
by: deko | last post by:
I have a Make Table query that creates a fairly large table. The Make Table query populates the new table with one AutoNumber field (which is taken form another unrelated table as part of the...
10
by: deko | last post by:
I understand it's possible to make a composite Primary Key by holding down the control key and selecting multiple fields, then right-clicking and selecting Primary Key. But I've heard that's not a...
10
by: Laurence | last post by:
Hi there, How to differentiate between unique constraint and unique index? These are very similar but I cannot differentiate them? Could someone give me a hand? Thanks in advance
8
by: paii, Ron | last post by:
I have a table listing drawing numbers for jobs. It's primary key combines Job and numeric part of the drawing number. The structure allows the number part to repeat for each job. Job Dwg...
3
by: vj_dba | last post by:
Hi Group, I have a Primary key in my table. It's clear Primary key wont allow duplicates, this primary key creates one index for retrival. Suppose if my table is having a Unique index also....
4
by: bdockery | last post by:
Access 2007 I have a table with three columns. Country, State, City What I want to do is have a form where the Country, and State, lookups auto-populate when the city lookup is chosen. It...
0
by: muzu1232004 | last post by:
If I have a table t1 with a column a as follows A 1 1 1 1 1 1 1
6
by: Alvin SIU | last post by:
Hi all, I have a table in Db2 v8 like this: Team Name Role ------ -------- --------------------- A Superman Leader A Batman Member A WonderWoman Member B ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.