Jump to content
  • 0

Problem Importing Data - Records Skipped


Question

I am new to Caspio and attempting to create my first application. I was attempting to import my data and ran into a problem with a table skipping records with the following message:

 

The table contains unique fields with duplicate or blank values. These values were not imported

 

The statement is an impossibility because my source data has a defined primary key. My source table is located in a SQL database and I exported it to a flat file for import into Caspio. The structure of the source table is shown below:

 

CREATE TABLE FacilityAddresses (

     FacilityAddressID UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL CONSTRAINT DF_FacilityAddresses_FacilityAddressID DEFAULT (NEWID()),

     FacilityID UNIQUEIDENTIFIER NOT NULL,

     AddressID UNIQUEIDENTIFIER NOT NULL,

     Priority INT NOT NULL,

CONSTRAINT PK_FacilityAddresses PRIMARY KEY CLUSTERED (FacilityAddressID ASC)

 ON PRIMARY

 

FacilityAddressID is a Primary Key and is not duplicated

FacilityID is a foreign key to the Facilities table

AddressID is a foreign key to the Addresses table

 

There are duplicate FacilityIDs in the table. This is necessary as a facility may have more than one address. There are also duplicate AddressIDs in the table. This too is necessary as some facilities share an address.

 

I don't know how the import tool is determining that there are duplicate values, There are three GUIDs in the table, but the combination of all three is unique. It must be seeing that there are duplicates in the columns individually, but if this is the case how can one ever create a table with foreign keys?

 

Any help would be appreciated.

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello!

 

Welcome to Caspio forum!

 

I had the same problem.

 

Please verify, what DataTypes are used for "FacilityID" and "AddressID" fields. If DataType is GUID, it must be unique. If you want make them not unique, you should use another DataType, for example, Text255 or Text64000.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...