Jump to content

Update tabble


NewEra13

Recommended Posts

Hello,

 

1- We have some recors that exists in our "datamart" table but doesn't exists anymore in our source system tables.

 

2- Therefore, we want to hardcore "Unknown" or 0 values into some of those record's columns (column1 and column2 for example)

 

3- This is our 2 tables beeing involved:

Datamart.TableA

SourceSystem.TableB

 

4- We want to UPDATE our Datamart.TableA table as mentionned above in order to insert "Unknown" or 0 values on the columns of the recors that NO longer exists in our SourceSystem.TableB

 

5- This is how our 2 tables are linked:

Datamart.TableA.Enumber = SourceSystem.TableB.Eid

and

Datamart.TableA.AccountNo = SourceSystem.TableB.AccountID

 

QUESTION:

I sort of have an idea that i will probably need to use a NOT EXISTS somewhere in my code as well as

Datamart.TableA.Eunmber = SourceSystem.TableB.Eid

and

Datamart.TableA.AccountNo = SourceSystem.TableB.AccountID

 

But, i'm not quite sure how to formulate all this. Any advice please ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...