November 5, 2012 at 10:49 pm
Hi Everybody 🙂
We ship books - no more than 10 books per box. And Other items (toys, etc.) – no more than 15 pounds per box. Books are shipped separately from Other items. But orders usually contain a mix of items (let's say: 28 Books and 34 pounds of Other items).
Is there a way to create a packing slip for every box? In the case described above:
- Two boxes with 10 books each
- One box with 8 books
- Two boxes with 15 pounds of Other items each
- One box with 9 pounds of Other items
Thank you!
November 5, 2012 at 11:04 pm
justforgroups2004 (11/5/2012)
Hi Everybody 🙂We ship books - no more than 10 books per box. And Other items (toys, etc.) – no more than 15 pounds per box. Books are shipped separately from Other items. But orders usually contain a mix of items (let's say: 28 Books and 34 pounds of Other items).
Is there a way to create a packing slip for every box? In the case described above:
- Two boxes with 10 books each
- One box with 8 books
- Two boxes with 15 pounds of Other items each
- One box with 9 pounds of Other items
Thank you!
Based on the information that you have provided, I'd say that the answer is yes.
But if you want a technical solution, you'll have to provide sample data, DDL, desired output - see the link in my signature for details.
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.
November 6, 2012 at 1:20 am
Thank you for reply, Phil!
Here's the data generator. Still working on the output.
---------------------
CREATE TABLE [dbo].[Orders](
[OrderNumber] [int] NOT NULL,
[ItemNumber] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ItemDescription] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Book] [int] NULL,
[OtherItem] [int] NULL,
[WeightEach] [decimal](20, 8) NULL,
[NumberOfPieces] [int] NULL
) ON [PRIMARY]
---------------------
INSERT INTO orders
(OrderNumber,ItemNumber,ItemDescription,Book,OtherItem,WeightEach,NumberOfPieces)
SELECT '1','ku85487','Dr. Seuss','1','0','0.00000000','30' UNION ALL
SELECT '1','w5647f','Perplexus Maze Game','0','1','5.00000000','2' UNION ALL
SELECT '1','lk875fc','Llama Llama','1','0','0.00000000','9' UNION ALL
SELECT '2','547juy0','Where the Wild Things Are','1','0','0.00000000','6' UNION ALL
SELECT '2','ikj75254','Pete the Cat','1','0','0.00000000','8' UNION ALL
SELECT '2','hytr54','Happy Birthday to You','1','0','0.00000000','10' UNION ALL
SELECT '2','58jkjhyt','Spot It','0','1','3.00000000','4'
---------------------
November 6, 2012 at 11:56 am
Hi - If I understood correctly :
It looks like your first step is a [boxes] entity/table.
A stored procedure could go through the order, determine how many boxes are needed then create and assign a book or other item to the appropriate box ID .You can then insert the pair (book1, box1).. into a item-Box transactions table. You should have a field in the box table to identify what type of items it holds (books/..) as well.
----------------------------------------------------
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply