April 24, 2009 at 8:37 am
I am building a Quotation Database. I basically have it done, but was asked to add the functionality of rolling multiple quoted parts into one master Item Quote. In other words, it takes 2 of item 'A' and 1 of item 'B' to make item 'C'. Take the Price of items 'A'(x2) and 'B'(x1) and add them together to make item 'C'. (With assembly and material costs for itm 'C' also) These are also quoted for muliple order qtys with price breaks for higher qtys.
How can I get the prices to roll up to the master no matter how 'deep' the assembly goes? ie. the above item 'C' is also a subcomponent of another part. etc.
I would upload a screenshot of my table structure if I knew how.
Rob
April 24, 2009 at 8:54 am
You can do it with a recursive CTE - without sample data to show you, you had better google that (actually just remembered that the MSDN entry for CTEs uses product structure as an example)
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply