int Foreign key column data type not consistent with parent column uniqueidentifier

int Foreign key column data type not consistent with parent column uniqueidentifier

Post by Bill Berna » Tue, 23 Nov 2004 14:08:22


The error "Foreign key column data type not consistent with parent column"
appears every time that an int is a foreign key to a uniqueidentifier.

Do I have any options other than not using uniqueidentifier columns? That
seems a bit extreme, but I need to be able to generate the database from the
visio diagram.

I'm using Visio 2002 ea SP2. Any help would be greatly appreciated, thanks!

-billb
 
 
 

1. Parent Columns and Child Columns don't have type-matching columns

2. How to tell if column is Primary Key or foreign key or not.

Is there a way to find out if a column in a given table is a primary key or
foreign key in another table?

I am using a query to get the tables a particular column name is in, but it
doesn't give this information.

SELECT * FROM sys.columns s
WHERE name = @FieldName AND
OBJECT_NAME(object_id) NOT LIKE '%Old%' AND
OBJECT_NAME(object_id) NOT LIKE 'sys%'

This will give me a list of tables a column belongs to but if there are 10
tables it belongs to - which one is the primary table it is in, such as
StudentID would be the primary key in the Students table but not in the
courses table where it would be a foreign key. I also want to know if it is
neither.

Thanks,

Tom

3. [Fwd: [SQL] multi column foreign key for implicitly unique columns]

4. More than one column FOREIGN KEY constraint specified for column

5. Appending Data to a Table with 3 lookup Columns (Foreign Keys)

6. Query does not fetch any data when uniqueidentifier column in included.

7. Activa or not activate a button column depending if another data column has data or not

8. VW NC 7.2.1: Lens data form: remove/hide foreign key column?

9. Converting UniqueIdentifier to Int data type

10. Syntax error converting the varchar value 'admi' to a column of data type int.

11. How to change columns on which there are primary keys, foreign keys and indexes?

12. foreign key on a unique key column?????

13. Identity column as a primary key with foreign key relationships

14. Syntax error converting the varchar value 'selectedCategory4' to a column of data type int

15. How to change data type of column from int to bigint in replication