Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Scheduler Error 22

iamRandy
8 - Asteroid

I created a workflow that insert if new type in my SQL server table (with RecordID as primary key).  When the scheduler executes at the end of the execution message it appears that the new data is being inserted into the sql table, but it also provides Error 22 (violation of primary key.

 

If i ran the workflow manually there's no primary key violation, but when the scheduler runs that is where the primary key violation appears. I'm puzzled. 

 

Please advise. Thanks in advance! 

 

Alteryx_Workflow_1.png

 

Alteryx_Write_1.png

 

Alteryx_Error_1.png

2 REPLIES 2
TimN
13 - Pulsar

Hi,

If you are keeping data in the table then won't your process duplicate the Record ID every run?  That would cause the PK error.  If that is the issue then you need to query the table before you write to it, get the max PK and then increment from there as one option to avoid duplicate keys.

 

Regards.

iamRandy
8 - Asteroid

I figured it out. The field RecordID is set to Primary Key with identity seed defined.

Labels