Questions tagged «relational-division»

2
查找具有相同的子行集的父行
假设我有一个这样的结构: 食谱表 RecipeID Name Description RecipeIngredients表 RecipeID IngredientID Quantity UOM 关键RecipeIngredients是(RecipeID, IngredientID)。 查找重复食谱的一些好方法是什么?重复配方定义为具有完全相同的一组配料以及每种配料的数量。 我曾经考虑过使用FOR XML PATH将成分合并到一个单独的列中。我尚未对此进行全面探讨,但是如果我确保成分/ UOM /数量按相同顺序排序并具有适当的分隔符,那么它应该可以工作。有更好的方法吗? 有48K食谱和200K成分行。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.