I have successfully created a flow that updates the data in the flow. I would like to write those changes back to my SQL Server database so I can track what has happened.
For instance, UPDATE mytable SET myfield = 1 WHERE keyfield = [keyfield].
Both the keyfield and the myfield are represented in a Formula that holds all the values in records as I need them (as verified in a Browse). I send those records to an Output which is set to "Update; Warn on Update Failure", but all I get is an error that says "Primary Key required for Update option".
I would even settle for assigning a static value to myfield for each record identified by keyfield.
Does Alteryx write back to a database?
Am I missing such a basic capability?
Solved! Go to Solution.
Hi @karlhansen ,
I'm not an expert, but I use to get that error when trying to update a table in a database.
So, to use the Alteryx designed function of updating a database, you need to have a primary key defined in your database table in order to work.
Best,
Fernando V.
As I looked further due to your suggestion, I found I had created an identity field, but not a primary key. That has been changed, and, when tested, showed that the database update ran smoothly.
Problem solved! Thank you!
User | Count |
---|---|
17 | |
14 | |
13 | |
8 | |
6 |