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

Thread: Plzz Help

Threaded View

  1. #2
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    One way would be to do

    declare
    begin
    --do the update
    update table
    set col1=some_value
    where col2=some_condition; --based on some criteria
    --check wheather u updated any rows
    if sql%rowcount=0 then
    --do nothing
    NULL;
    else
    insert into tables
    values(some_value);
    end if
    end;

    regards
    Hrishy
    Last edited by hrishy; 03-04-2004 at 06:15 AM.

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