Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Item Sales Batch Allocation

    My mistake,

    I think i started from the bottom to the top:

    Short story long:

    Considering next script:

    DECLARE @Table TABLE

    (

    RowID int identity Primary Key,

    DOCTYPE varchar(40),

    DocNum varchar(40),

    Date datetime,

    QTY int,

    Item varchar(10),

    LOT varchar(30)

    )

    SELECT 'Input'

    INSERT INTO @Table...

  • RE: Item Sales Batch Allocation

    The result should look like this:

    RowIDDOCTYPEDateColQTYPRDLOT

    1Purchase00:00.00AA2007FW

    2Sale00:00.0-20AA2007FW

    6Sale00:00.0-10AA2007SS

    3Purchase00:00.020AA2007SS

    4Sale00:00.0-20AA2007SS

    5Purchase00:00.010AA2007FW

    I don't care about RowID for Sale type.

    Regarding the loop method, do u have a better advice? My neuron is quite depressed because of...

Viewing 2 posts - 1 through 2 (of 2 total)