更新具有不同值的多行,但有一个条件
以下是包含存储数据的表,并由order_id识别。
order_id | erp_id | serial_no |
---|---|---|
1234567 | ml456g | null |
1234567 | ml456g | null |
1234567 | ml456g | null |
在表中您可以看到order_id and erp_id均相同。现在,我有一个文件,其中包括一组订单_id和erp_id的集合,以及serial_no列的数据在瞬间为无效,但需要如下表填充。
order_id | erp_id | serial_no |
---|---|---|
1234567 | ML456G | 12345678952 |
1234567 | ML456G | 75685212542 |
1234567 | ML4567 ML456G | 56821236254 |
Below is a table which includes data of store and are identified by order_id.
order_id | erp_id | Serial_No |
---|---|---|
1234567 | ML456G | null |
1234567 | ML456G | null |
1234567 | ML456G | null |
In the table you can see order_id and erp_id both are same. Now I have a file which includes set of order_id's and erp_id's and data for serial_no column is null at the moments but need to be filled as below table.
order_id | erp_id | Serial_No |
---|---|---|
1234567 | ML456G | 12345678952 |
1234567 | ML456G | 75685212542 |
1234567 | ML456G | 56821236254 |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过在Excel中导出数据并生成辅助列,然后Vookup来更新所需的列来找到解决方案。
谢谢大家:)
I found a solution by exporting a data in excel and generating a helper column and then vlookup to update the desired column.
Thanks All :)