UiPath Studio Getting Data Fail

Hey,
I need help.
I have an RPA robot, that first connects to MS SQL (that works), and then it connects to a different SQL server to get specific data.
That specific data, will then be put in MS SQL Server.

But when I have the “Run query” with SELECT. It says: “Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.”

And I have made the connection to that database above my run query.
And when I look in that database, I can see that some of the coloumns are [NULL]. It is okay that they are null, but it’s only because of those [NULL] columns that it won’t work.

Can someone help?

You might be are getting duplicate values for Primary Key or null values, something like this.

If you want to have null values in DB set column property AllowDBNull

Hi @silkefu

adjust your sql query to replace nulls with default values using functions like isnull() or coalesce()

If helpful, mark as solution. Happy automation with UiPath