Insert data from table1 to table2 depending on user_id and record_id

So I need to insert some records from table1 to table2 depending on their user_id (PVKEY) and record_id (CNKEY). Just to explain better, every user has his own unique user_id (PVKEY) and every record has his own record_id (CNKEY). One user can have couple of records but everytime when the new record is added it needs to get new record_id (CNKEY) Everytime I try to insert I get message:

"Cannot insert the value NULL into column 'CNKEY', table 'Progress.dbo.CONTHIST'; column does not allow...

Insert data from table1 to table2 depending on user_id and record_id

from Databases http://ift.tt/1VQb6WD
via IFTTT
Previous
Next Post »
Thanks for your comment