How to replace order id values that are the same with unique values in SQL or Excel

时间:2018-08-22 13:54:22

标签: sql excel database

I am trying to create a table ORDER in SQL which will have the order id as a primary key and the customer id as a foreign key so I can later perform market basket analysis. The problem is that in the dataset I was given (an Excel sheet) many customer id's have the same order id. The customer id is

  • G123_,G158_,G346_*

Where * one to four digit number.for example G123_1,G123_246,G158_78 they all have order id=438. i have 19.000 transactions which every transaction is different but it was given in the dataset same number with another transaction. Is there a way in SQL or Excel to replace the order id with unique order id for every customer id?

0 个答案:

没有答案