在第二个表中的ID中以JSON格式嵌入ID时,我将如何加入这2个表?
我想在唯一ID上加入这两个表基础,但是其中一个表中的唯一ID嵌入了JSON格式。
第一表
unique_id | product_no | product
------------------------------
345644046 | 123| acme widget
------------------------------
476897686 | 456| acme gadget
第二个表
supplier_id | product_info | supplier_name
------------------------------
12345787871 |[{"Id":"345644046",...... }]| john_wick
------------------------------
72736127172 |[{"Id":"476897686",...... }]| justin_bieber
我将如何加入这2个表,因为第二个表中的ID以JSON格式嵌入?
感谢您的帮助!
I will like to join these 2 tables base on the unique id but the unique id in one of the tables is embedded in JSON format.
1st table
unique_id | product_no | product
------------------------------
345644046 | 123| acme widget
------------------------------
476897686 | 456| acme gadget
2nd table
supplier_id | product_info | supplier_name
------------------------------
12345787871 |[{"Id":"345644046",...... }]| john_wick
------------------------------
72736127172 |[{"Id":"476897686",...... }]| justin_bieber
How will I be able to join these 2 tables as the ID in the second table is embedded in JSON format?
Thank you for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Table2中的ProductInfo是产品列表吗?
在这种情况下,干净的解决方案首先将表_2分为多行,
这将为您提供
您有很多方法可以加入您的表_1,例如:
还有另一种非常丑陋的方法实现这一目标,只是为了娱乐
ProductInfo in table2 is a list of product right?
In this case, the clean solution is first to split the Table_2 in multiple rows
this will give you
from there you have many ways to join with your table_1, ex:
Also there is another very ugly way to achieve this, just for fun