SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Selecting BETWEEN dates getting more rows
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rogerclerkwell
Yak Posting Veteran

United Kingdom
62 Posts

Posted - 10/31/2013 :  12:24:25  Show Profile  Reply with Quote
I have two tables a stock table and a price table and I want to select the correct price for the Stock Date.

Problem is sometimes there is a promotion date in the price table between the live dates so the rows double up. Below is my sql but I get over 17,000 rows when it should be about 16,964.

I will post up the table and data.

SELECT a.[Company]
,a.[ProductID]
,a.[ColourSize]
,a.[StockDate]
,a.[Quantity]
,b.[Ticket Price]

FROM [Stock_Ledger] a

LEFT OUTER JOIN [Product_Prices] b

ON a.[Company] = b.[Company]
AND a.[ProductID] = b.[ProductID]
AND a.[ColourSize] = b.[ColourSize]
AND a.[StockDate] BETWEEN b.[StartDate] AND b.[EndDate]

ORDER BY a.[StockDate],a.[ProductID],a.[ColourSize]


rogerclerkwell
Yak Posting Veteran

United Kingdom
62 Posts

Posted - 10/31/2013 :  12:25:09  Show Profile  Reply with Quote
CREATE TABLE [dbo].[Product_Prices](
[Company] [varchar](20) NULL,
[PriceCode] [varchar](20) NULL,
[StartDate] [Datetime],
[EndDate] [Datetime],
[ProductID] [varchar](20) NULL,
[ColourSize] [varchar](10) NULL,
[Ticket Price] [numeric](38, 20) NULL
)
;


INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BK000L','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BK000M','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BK000S','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BK000XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BL002L','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BL002M','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BL002S','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BL002XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','GY011L','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','GY011M','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','GY011S','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','GY011XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','GY026L','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','GY026M','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','GY026S','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','GY026XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','PU014L','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','PU014M','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','PU014S','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','PU014XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','PU054L','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','PU054M','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','PU054S','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','PU054XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','WH000L','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','WH000M','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','WH000S','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','WH000XS','36');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BK000L','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BK000M','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BK000S','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BK000XS','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BL002L','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BL002M','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BL002S','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BL002XS','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','GY011L','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','GY011M','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','GY011S','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','GY011XS','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','GY026L','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','GY026M','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','GY026S','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','GY026XS','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','PU014L','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','PU014M','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','PU014S','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','PU014XS','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','PU054L','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','PU054M','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','PU054S','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','PU054XS','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','WH000L','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','WH000M','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','WH000S','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','WH000XS','28.8');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','BK000L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','BK000M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','BK000S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','BK000XS','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','BL002L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','BL002M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','BL002S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','BL002XS','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','GY011L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','GY011M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','GY011S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','GY011XS','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','GY026L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','GY026M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','GY026S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','GY026XS','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','PU014L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','PU014M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','PU014S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','PU014XS','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','PU054L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','PU054M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','PU054S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','PU054XS','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','WH000L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','WH000M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','WH000S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','24-Dec-12','30-Jul-13','SA5261','WH000XS','25');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','BK000L','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','BK000M','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','BK000S','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','BK000XS','36');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','BL002L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','BL002M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','BL002S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','BL002XS','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','GY011L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','GY011M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','GY011S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','GY011XS','25');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','GY026L','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','GY026M','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','GY026S','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','GY026XS','36');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','PU014L','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','PU014M','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','PU014S','25');
INSERT INTO Product_Prices VALUES ('CO1','AW12','31-Jul-13','03-Sep-13','SA5261','PU014XS','25');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','PU054L','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','PU054M','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','PU054S','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','PU054XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','WH000L','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','WH000M','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','WH000S','36');
INSERT INTO Product_Prices VALUES ('CO1','','31-Jul-13','03-Sep-13','SA5261','WH000XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','BK000L','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','BK000M','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','BK000S','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','BK000XS','36');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','BL002L','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','BL002M','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','BL002S','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','BL002XS','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','GY011L','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','GY011M','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','GY011S','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','GY011XS','18');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','GY026L','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','GY026M','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','GY026S','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','GY026XS','36');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','PU014L','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','PU014M','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','PU014S','18');
INSERT INTO Product_Prices VALUES ('CO1','50% OFF','04-Sep-13','01-Jan-50','','PU014XS','18');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','PU054L','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','PU054M','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','PU054S','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','PU054XS','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','WH000L','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','WH000M','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','WH000S','36');
INSERT INTO Product_Prices VALUES ('CO1','','04-Sep-13','01-Jan-50','','WH000XS','36');
Go to Top of Page

rogerclerkwell
Yak Posting Veteran

United Kingdom
62 Posts

Posted - 10/31/2013 :  12:27:33  Show Profile  Reply with Quote
CREATE TABLE [dbo].[Stock_Ledger](
[Company] [varchar](20) NULL,
[ProductID] [varchar](20) NULL,
[ColourSize] [varchar](10) NULL,
[StockDate] [Datetime],
[Quantity] [numeric](38, 20) NULL
)
;

INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','09-Aug-12','90');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','09-Aug-12','180');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','09-Aug-12','181');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','09-Aug-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','09-Aug-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','09-Aug-12','-1');
Go to Top of Page

rogerclerkwell
Yak Posting Veteran

United Kingdom
62 Posts

Posted - 10/31/2013 :  12:28:06  Show Profile  Reply with Quote
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','10-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','10-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','11-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','11-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','11-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','11-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','11-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','11-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','11-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','12-Dec-12','-4');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','12-Dec-12','3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','12-Dec-12','-7');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','12-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','12-Dec-12','3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','12-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','12-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','13-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','13-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','13-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','13-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','13-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','13-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','13-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','13-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014S','13-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','14-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','14-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','14-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','14-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','14-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','14-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','14-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','15-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','15-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','15-Dec-12','4');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','15-Dec-12','-4');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','15-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','15-Dec-12','3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','15-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','15-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','15-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','15-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','15-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','15-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','15-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','15-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','15-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','15-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','16-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','16-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','16-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','16-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','16-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','16-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','16-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','17-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','17-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','17-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','17-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','17-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','17-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','18-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','18-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','18-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','18-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','19-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','19-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','19-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','19-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','19-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','19-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','19-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','20-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','20-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','20-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','20-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','20-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','20-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','20-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','20-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','20-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','21-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','21-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','21-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','21-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','22-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','22-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','22-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','22-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','22-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','22-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','22-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','22-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','22-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','22-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','23-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','23-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','23-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','24-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','24-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','24-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','26-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','27-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','27-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','27-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','27-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','27-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','27-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','28-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','28-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','28-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','28-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','28-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-4');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','29-Dec-12','-4');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','29-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','-5');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','-5');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','29-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','29-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','29-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','30-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','30-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','30-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','30-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','30-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','30-Dec-12','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','31-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','31-Dec-12','-3');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','31-Dec-12','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','31-Dec-12','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','01-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','02-Jan-13','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','02-Jan-13','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','02-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','02-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','03-Jan-13','-4');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','03-Jan-13','2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014M','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014S','03-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014S','03-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','04-Jan-13','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000M','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000S','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','04-Jan-13','-2');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002L','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002M','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BL002S','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011L','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011M','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','GY011S','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','04-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','PU014L','04-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','05-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','05-Jan-13','1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','05-Jan-13','-1');
INSERT INTO Stock_Ledger VALUES ('CO1','SA5261','BK000L','05-Jan-13','-1');
Go to Top of Page

rogerclerkwell
Yak Posting Veteran

United Kingdom
62 Posts

Posted - 10/31/2013 :  12:31:38  Show Profile  Reply with Quote
I can't post all the stock data as it is too big so done some samples above, main date problem is 13-DEC-12 e.g in price file these lines:

INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BK000L','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BK000M','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BK000S','36');
INSERT INTO Product_Prices VALUES ('CO1','','26-Jul-12','23-Dec-12','SA5261','BK000XS','36');

INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BK000L','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BK000M','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BK000S','28.8');
INSERT INTO Product_Prices VALUES ('CO1','Promotion','13-Dec-12','13-Dec-12','SA5261','BK000XS','28.8');

You can see one date range is '26-Jul-12' to '23-Dec-12' but on the 13-Dec-12 for one day there was a Promotion (this code isn't always used)
When selecting joined to stock I think it is puling both prices the '26-Jul-12' to '23-Dec-12' 36.00 and the 13-Dec-12 28.80.

How can I make it only select the 13-Dec price....

I'm stuck...
Go to Top of Page

rogerclerkwell
Yak Posting Veteran

United Kingdom
62 Posts

Posted - 10/31/2013 :  14:21:03  Show Profile  Reply with Quote
Any Ideas?
or what to search in net to maybe work it out?
Go to Top of Page

waterduck
Aged Yak Warrior

Malaysia
961 Posts

Posted - 10/31/2013 :  22:04:31  Show Profile  Reply with Quote

;WITH cte AS(
	SELECT
		a.[Company]
	,	a.[ProductID]
	,	a.[ColourSize]
	,	a.[StockDate]
	,	a.[Quantity]
	,	Priority
	,	b.[Ticket Price]

	FROM	[Stock_Ledger] a

	LEFT OUTER JOIN (SELECT
				*,
				Priority = CASE WHEN PriceCode = 'Promotion' THEN 2 ELSE 1 END
			FROM	[Product_Prices]) b

	ON a.[Company] = b.[Company]
	AND a.[ProductID] = b.[ProductID]
	AND a.[ColourSize] = b.[ColourSize]
	AND a.[StockDate] BETWEEN b.[StartDate] AND b.[EndDate]
)
SELECT	*
FROM	Cte a
WHERE	Priority = (	SELECT	MAX(Priority) 
			FROM	cte b 
			WHERE	a.[Company] = b.[Company]
				AND a.[ProductID] = b.[ProductID]
				AND a.[ColourSize] = b.[ColourSize]
				AND a.[StockDate] = b.[StockDate]
				AND a.[Quantity] = b.[Quantity])

ORDER BY a.[StockDate],a.[ProductID],a.[ColourSize]
Go to Top of Page

rogerclerkwell
Yak Posting Veteran

United Kingdom
62 Posts

Posted - 11/01/2013 :  05:43:21  Show Profile  Reply with Quote
Hi Waterduck,

Thanks for the reply, Price Code 'Promotion isn't always used, but I can see what you have done and looks a good idea.
I will give the above a go and then maybe use your idea of numbering and doing MAX with a rank on [Company], [ProductID], [ColourSize], [StartDate].
Then I could maybe after that selecting where the Rank number is highest.

So if there were 2 prices on the same day it will select the rank 2 price...

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.67 seconds. Powered By: Snitz Forums 2000