I'm currently writing a query that is grabbing data from a table and I want to update one of the columns in that table. The update needs to be based off the distinct values from one column. For example:
| Type | ID |
|---|---|
| x | ID1 |
| x | ID1 |
| y | ID2 |
| y | ID2 |
| z | ID3 |
| z | ID3 |
The catch here is that I can't use a loop to do it.
The table has a lot more columns but I'm only sorting it by "Type" and then updating that table and assigning a unique ID based off its "Type"
Any ideas on how to do this?