Hi! Wondering if anyone knows an easy way to do this. I have a couple of tables with data, this data is "static" in that way that users don't change it, it's only me that gets to insert/update rows. And I wonder if there's an easy way to insert rows that don't exists and update rows that are different.
The way that I figured would work would be to do like this:
IF((SELECT COUNT(*) FROM myTable WHERE myId = x) = 0)
INSERT myTable() values()
ELSE
UPDATE myTable SET data = updatedData WHERE myId = 0
But since I have quite many rows that I want to update, I wonder if there's an easier way to do this. There's a Data comparer in VS Database, is it possible to use it in some way from a query script or some other way? I want these updates to be done when deploying a database project with VS.
Thanks.