Hi Everyone,
Need your help on this.
I have two tables that I need to identify if there is a data existing from my secondary table and update it on my primary table, and if there is a new record from the secondary, should insert that data too. But there is a problem in my data,
there is a data issue between primary and secondary table. The 'NAME' from secondary table may be differ from the primary but has the same 'ID Number' and vice versa..
How I able to make a such condition that either the two column name has different value for as long as it has one matched record from secondary table to primary table
Here's the sample data:
Primary Table
Name Idnumber Price1 Price2 Price3 Price4
marie 12 123 234.23 0 0
jennifer 13 343 100 0 0
Secondary Table
Name Idnumber Price1 Price2
marie s 12 189 230
jennifer 14 150 125
mery 16 420 500
UPDATE: Primary Table
Name Idnumber Price1 Price2 Price3 Price4
marie 12 123 234.23 189 230
jennifer 13 343 100 150 125
mery 16 0 0 420 500
As you can see the results, this what I want to do.
Need your expertise on this
Thank you in advance.
Need your help on this.
I have two tables that I need to identify if there is a data existing from my secondary table and update it on my primary table, and if there is a new record from the secondary, should insert that data too. But there is a problem in my data,
there is a data issue between primary and secondary table. The 'NAME' from secondary table may be differ from the primary but has the same 'ID Number' and vice versa..
How I able to make a such condition that either the two column name has different value for as long as it has one matched record from secondary table to primary table
Here's the sample data:
Primary Table
Name Idnumber Price1 Price2 Price3 Price4
marie 12 123 234.23 0 0
jennifer 13 343 100 0 0
Secondary Table
Name Idnumber Price1 Price2
marie s 12 189 230
jennifer 14 150 125
mery 16 420 500
UPDATE: Primary Table
Name Idnumber Price1 Price2 Price3 Price4
marie 12 123 234.23 189 230
jennifer 13 343 100 150 125
mery 16 0 0 420 500
As you can see the results, this what I want to do.
Need your expertise on this
Thank you in advance.