I have the table "@temp" that contian id. and another table "myTable" that contain id, counter
the field of id in both tables is equal. but not exists all @temp.id in the myTable.id.
i want to
1 - increment counter if @temp.id exist in the myTable (@temp.id = myTable.id)
2 - and if the id not exists in the myTable, then create new row for the id and set counter to 1
i know i should update using inner join for state one,but what about another one?. i looking for a fast and optimized solution.
Do using the Cursor is good way or there is a better way?
Best Regards. Morteza
View Complete Post