I am trying to move away from using cursors in SQL and I was wondering what is the most efficient way to accomplish this?
I have a PO Line table called PODETAIL where the PK is PONUMBER,POLINE. I have this two in two different instances of SQL. I want to insert/update the records from instance A to instance B. If I were to use a cursor I would have a select statement looking for existing records in instance B. If it did not exist, I do an insert statement, if it did exist I would do an update statement. How do you accomplish the same thing without cursors?