Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

1 Primary Key - Another not unique

$
0
0
I have a customer file that I import to project each month . I am now using 9.8 and in the future 10.0 which should check for existing records and either update or add new records according to the manual if using a primary key in file. My older project was 9.7 I just truncated table and uploaded a new Customer file, Which I do not want to do anymore due to google map fields which I have to do geocoding every time I import a new file. So I made CustomerID the primary key instead of auto_number . Fine. Only problem is there are several CustomerID's that have EmployeesID's connected to the same Customer ( hence 3 records of CustomerID ) so it can't be the primary key. So I want to use a second key EmployeeID / or non unique field in the table mysql to import . My table looks something like this

CustomerID
EmployeeID
Employee
Division
fldgroup
address
city
state
zip
lat
lng
map

Is it possible to have a primary key and a non-unique composite key in mysql table / project - upon the import . I tried this link with constraint with multiple fields, but I keep getting syntax error in query wizard in my project. If I could use two fields it would make the record unique.

Or do I have to import a file like this
CustomerID
EmployeeID1
EmployeeID2
EmployeeID3

which I am trying to avoid due to numerous Session calls of just the one field called EmployeeID (connections and events) in other tables in the project.

Thanks for any ideas in advance.

Viewing all articles
Browse latest Browse all 2586

Trending Articles