Re: PL SQL logic please

From: Sybrand Bakker <gooiditweg_at_nospam.demon.nl>
Date: Sun, 30 Jul 2006 22:56:57 +0200
Message-ID: <s07qc258jvkb0ahl0160qkoo9ioe2qge54_at_4ax.com>


On 30 Jul 2006 11:28:05 -0700, trsspk_at_gmail.com wrote:

>I have two tables:
>
>test_pick (headerid,lineid,item,qty_ordered,qty_shipped)
>test_recv
>(headerid,item,qty_shipped,status)
>
>issue here is, i have to update test_pick table qty_shipped column from
>test_recv qty_shipped column.
>
>since you guys already might have noticed qty_recv has no line id.
>
>if i don't get item number repeated for one header I'm very fine.
>
>but for one header, possibility is there to have items repeated. and
>the qty ordered may not match to qty shipped. it could be same/less or
>more.
>
>hope its not a big challenge for you gurus to help me out hinting
>pl/sql logic flow.
>
>appreciate all your help.

The logic of your homework exercise doesn't make sense as the test_pick table is the lineitems table and the test_recv the order table. In that case the qty_shipped column - ought not the be there
- if it is there it should be the sum of the respective line_item records
The other alternative is your cripple and incomprehensible English describes a real mess, which can not be dealt with by any logic.

Other than that, this homework exercise is so elementary, that anyone should be able to do it, and you should not have others do your work (which is what you are at)

--
Sybrand Bakker, Senior Oracle DBA
Received on Sun Jul 30 2006 - 22:56:57 CEST

Original text of this message