DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: procedure

  1. #1
    Join Date
    Nov 2001
    Posts
    29

    I want a pl/sql query to update a transaction table where multiple rows are there. the records will be like
    in master table
    slno product ord_qty del_qty
    1 12456 10
    2 12586 8
    in detail table
    slno product ord_qty del_qty due_date
    1 12456 2 25-nov-01
    1 12456 3 30-nov-01
    1 12456 5 15-dec-01
    2 12586 8 15-dec-01
    now when i enter a value for eg. 6 then it should update 1st table slno 1 del_qty with 6 and in 2nd table it should check the slno 1 1st row for the ord_qty with 6 this 6 is greater than ord_qty i.e.,2 so it has to update 1st row of slno del_qty with 2 and remaining 3 in 2nd row of slno 1 and 1no in 3rd row of slno 1. and next time i give as 4 then in 1st table it has to update with previous value + this 4 and in 2nd table it has to check for the balance in 1st row,2nd row,3rd row should update accordingly.

    balraj

  2. #2
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Talking


    break it down and write a few procedures to accomplish your goal. writing ONE procedure would make it too mind-boggling.
    starting small always seems to help me accomplish the LARGER goal.

    - Magnus

  3. #3
    Join Date
    Nov 2001
    Posts
    29
    what do you mean by "break it down"

    Originally posted by jgmagnus

    break it down and write a few procedures to accomplish your goal. writing ONE procedure would make it too mind-boggling.
    starting small always seems to help me accomplish the LARGER goal.

    - Magnus
    balraj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width