Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting Tracking Numbers to SOP10107

Status
Not open for further replies.

JavarisTharco

IS-IT--Management
Nov 20, 2008
1
0
0
US
Hello All,

I'm trying to write an Access application that inserts tracking numbers into SOP10107. The problem is I get "key violations" in the Appened Query in Access because the
SOPNUMBE is a "Key" value (I'm guessing Foreign Key to SOP10100). I know this can be done because I've seen
third-party shipping software add many tracking numbers for each line item.

+++++ MY SIMPLE ACCESS APPEND QUERY +++++
Code:
INSERT INTO dbo_SOP10107 ( SOPTYPE, SOPNUMBE, Tracking_Number )
SELECT SOPTYPE, SOPNUMBE, Tracking_Number
FROM tblTrackingNumbers
WHERE Timestamp>=DateAdd('h',-12,(Date()+Time()));
+++++++++++++++++++++++++++++++

Any help or pointers appreciated,

Tom H.
IT Manager
ELK Lighting, Inc.


 
The primary key on SOP10107 is the composite of the fields

SOPNUMBE, SOPTYPE, Tracking_Number

The values inserted need to be unique when all three fields are concatenated.
It appears you have the same tracking number for different SOP documents, with is not acceptable.

------
Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top