UPDATE

  • Thread starter Thread starter Piotr
  • Start date Start date
P

Piotr

I have following problem and I cant find any solution by myself:

I have two tables, table 1 and table 2, they consist records with two
fields in table 1 field A and B and in table 2 fields C and D:

UPDATE field B by field D if field A=C

I need this for data transformation purpose, please tell me if u know
the solution.

regards
Peter
 
It happens that Piotr formulated :
I have following problem and I cant find any solution by myself:

I have two tables, table 1 and table 2, they consist records with two
fields in table 1 field A and B and in table 2 fields C and D:

UPDATE field B by field D if field A=C

I need this for data transformation purpose, please tell me if u know
the solution.

regards
Peter

Hi!

The tables can be joined on table1.a and table2.c?

If so, try (on a copy first, perhaps?)

update table1 inner join table2 on table1.a = table2.c
set table1.b = table2.d
 
RoyVidar said:
It happens that Piotr formulated :

Hi!

The tables can be joined on table1.a and table2.c?

If so, try (on a copy first, perhaps?)

update table1 inner join table2 on table1.a = table2.c
set table1.b = table2.d

Hi, it works great !
thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top