本文介绍了SQL脚本根据条件将单个数据行拆分为多个数据行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我想根据拍品数量拆分客户订单。 这是客户订单表。 I want to split a customer order depending on Lot qty.Here is Customer Order table.Product Size Purch. Qty Lot Qty ----------------------------------------------- Addidas Shoe 8 30 25 Addidas Shoe 9 15 25 Addidas Shoe 10 50 25 Puma Shoe 7 40 30 Puma Shoe 8 60 30 我有2件产品Addidas鞋子要分成多排,这取决于它的Lot数量25和Puma鞋子要分成多排,具体取决于它批次数量30如下所示。 I have 2 products Addidas shoe to be splitted in to multiple rows depending on its Lot qty 25 and Puma shoe to be splitted in to multiple rows depending on its Lot qty 30 as shown below.Lot NoSl. NoProductSizeQty10001Addidas Shoe82510011Addidas Shoe8510012Addidas Shoe91510013Addidas Shoe10510021Addidas Shoe102510031Addidas Shoe102010041Puma Shoe73010051Puma Shoe71010052Puma Shoe82010061Puma Shoe83010071Puma Shoe810 请帮我解决这个问题。Please help me to get this.推荐答案 这篇关于SQL脚本根据条件将单个数据行拆分为多个数据行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-17 06:21