Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Location
    bkk
    Posts
    2

    Unanswered: procedure need help!

    I want to write program that use procedure in pl/sql to update table by 2 condition below,
    1.update table x set x.a=(select y.a from y
    where y.b=x.b)
    if y.a is null then update table x set x.c=1,
    2.update table x set x.d=(select z.d from z
    where z.g=x.g)
    if z.d is null then update table x set x.c=2

    this program will update about 100000 rows.
    how I write program that good performance, help me please?

    Thank you for your help very very much
    Last edited by kornvipa; 10-22-03 at 15:09.

  2. #2
    Join Date
    May 2003
    Posts
    87
    Do you need the logic or do you need to know how to effeciently update 100000 rows? I would use bulk binds to update those many rows. It uses the native pl/sql engine and the updates are much faster.

  3. #3
    Join Date
    Oct 2003
    Location
    bkk
    Posts
    2
    Thank you for your reply.
    I'm use pl/sql at first time I'm a beginner,so I want to know both logic and need effeciently.
    Can you guide me how to write program with condition that I post or can you coding example of program!

    Thank you,

  4. #4
    Join Date
    May 2003
    Posts
    87
    If you can post the pseudo code or logic, I can help you write the pl/sql code. And then, show you how to write it using bulk updates.

    In the meanwhile, you can start reading some book on pl/sql or the documentation at http://tahiti.oracle.com

    Originally posted by kornvipa
    Thank you for your reply.
    I'm use pl/sql at first time I'm a beginner,so I want to know both logic and need effeciently.
    Can you guide me how to write program with condition that I post or can you coding example of program!

    Thank you,

Posting Permissions

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