• Hi Herring,

    Below is my example to illustrate my issue.

    From your article, I know how to use function to

    update using select statement.

    But I can't think on how to insert new values

    using select statement. Please illustrate with

    example to guide me. How to convert my example

    into using select statement inserting and updating..

    Thank you.

    declare cur_insert CURSOR FOR

    select ..... FROM

    where xxxx

    While(xxx)

    begin

    if(xxx)

    Insert into values(xxxx)

    else

    update

    end