update table a from table b

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • michael newport

    update table a from table b

    in Ingres I can do this

    update table1 from table2
    set table1.field = table2.field
    where table1.id = table2.id

    is there an equivalent in Oracle ?

    Regards
    Michael Newport
  • Wit Serdakovskij

    #2
    Re: update table a from table b

    Hello, michael,

    About 02:20 01-Jul from michaelnewport@ yahoo.com accepted:
    in Ingres I can do this
    >
    update table1 from table2
    set table1.field = table2.field
    where table1.id = table2.id
    >
    is there an equivalent in Oracle ?
    update table1
    set field = (
    select field
    from table2
    where table2.id = table1.id
    );

    --
    wbr,
    Wit.

    Comment

    • michael newport

      #3
      Re: update table a from table b

      Hi Wit,

      did I say thankyou ?

      Thankyou.

      been rather busy with work !

      regards
      Mike

      a simple report is now an overnight pl/sql batch th

      Comment

      • michael newport

        #4
        Re: update table a from table b

        Hi Wit,

        did I say thankyou ?

        Thankyou.

        been rather busy with work !

        regards
        Mike

        a simple report is now an overnight pl/sql batch th

        Comment

        • michael newport

          #5
          Re: update table a from table b

          Hi Wit,

          did I say thankyou ?

          Thankyou.

          been rather busy with work !

          regards
          Mike

          a simple report is now an overnight pl/sql batch th

          Comment

          Working...