Diagram Designer error

  • I am new to SQL and I am converting a MS Access Database into a SQL

    Database. The Access database has no table relationships. One of the

    most obvious relationships happens to be the relationship between the

    QOL Project Database and the Crosswalks database where the primary

    key is the Project Number in the QOL database and foreign key is the

    Project Number in the Crosswalks table. When I make the relationship

    in Diagram Designer and try to save the change I get the following

    error:

    'Q of L Project Database' table saved successfully

    'Crosswalks' table

    - Unable to create relationship 'FK_Crosswalks_Q of L Project

    Database'.

    ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER

    TABLE statement conflicted with COLUMN FOREIGN KEY

    constraint 'FK_Crosswalks_Q of L Project Database'. The conflict

    occurred in database 'Q of L Project DatabaseSQL', table 'Q of L

    Project Database', column 'Project Number'.

    Can anyone explain this error? Thanks.

  • There are Project Numbers in Crosswalks table not existant in master table

    .

    Suggest that You clean the data in the tables. ( Either removing rogue records from Crosswalk or Add parent records in Q of L Project Database ).

    Or Create the constraint without checking existing data. ( There is a checkbox "Check existing data on creation2 that you can uncheck.&nbsp

    /rockmoose


    You must unlearn what You have learnt

  • I take it you have already imported the data. Is the 'Project Numbers' defined as an identity column. If so make sure you import the data with 'Identity Inserts' checked.


    Carl Davis

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply