Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    6

    Unanswered: update field from other table

    Need help.
    My employer asked me to update multiple records in a table using data from another table. I am experienced with SQL but I am relatively new to Informix.. I am not a programmer though.

    It seems that the common (access, MS SQL Server) syntax joining the two tables is not understandable with Informix.

    what I am used to:

    update table1
    set table1.field2=table2.field2
    from table1 inner join table2 on table1.field1=table2.field1

    Informix Dynamic Server 9.4 on SuSE SLES 8

    Thanx.

  2. #2
    Join Date
    Nov 2004
    Posts
    26
    Quote Originally Posted by Themis
    Need help.
    My employer asked me to update multiple records in a table using data from another table. I am experienced with SQL but I am relatively new to Informix.. I am not a programmer though.

    It seems that the common (access, MS SQL Server) syntax joining the two tables is not understandable with Informix.

    what I am used to:

    update table1
    set table1.field2=table2.field2
    from table1 inner join table2 on table1.field1=table2.field1

    Informix Dynamic Server 9.4 on SuSE SLES 8

    Thanx.
    update table1
    set table1.field2 = (select table2.field2 from table2 where table1.field1=table2.field1)
    where table1.field1 in (select table2.field1 from table2)

  3. #3
    Join Date
    Nov 2004
    Posts
    6
    Everything worked, thanx for your help.
    Cheers!!!

  4. #4
    Join Date
    Nov 2004
    Posts
    6
    Everything worked fine, thanx for your help.
    Cheers!!!

Posting Permissions

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