I’m trying to merge some data but beyond the basics I get a bit lost.
I have this..
INSERT INTO NewDB.Custs(Customer_ID) SELECT CustID FROM OldDB.Custs
Moving past this how would I increase the selection to add more?
Here’s the basic layout of what I have right now.
OldDB = This is the Old DataBase that has the data
NewDB = New Database where the Data goes into
|===========|==|===========|==|=============|==|===========|
|OldDB.Custs|..|NewDB.Custs|..|NewDB.Details|..|NewDB.Notes|
|===========|==|===========|==|=============|==|===========|
|CustomerID |>>|Customer_ID|>>|Customer_ID |>>|Customer_ID|
|CompanyName|>>|CompanyName|..|.............|..|...........|
|CFirstName |>>|FirstName |..|.............|..|...........|
|CLastName |>>|LastName |..|.............|..|...........|
|HowDidHear |>>|>>>>>>>>>>>|>>|HowHear_ID |..|...........|
|Notes |>>|>>>>>>>>>>>|>>|>>>>>>>>>>>>>|>>|CustNotes |
|Times |>>|>>>>>>>>>>>|>>|>>>>>>>>>>>>>|>>|NoteTime |
|Profession |>>|>>>>>>>>>>>|>>|Category_ID |..|...........|
|DefPmtMeth |>>|>>>>>>>>>>>|>>|DefaultPaymt |..|...........|
|Deactivated|>>|>>>>>>>>>>>|>>|Deactivated |..|...........|
|SalesRep |>>|>>>>>>>>>>>|>>|SalesRep_ID |..|...........|
|CertSent |>>|>>>>>>>>>>>|>>|CertSent |..|...........|
|===========|==|===========|==|=============|==|===========|
This is a diagram of what I’m trying to do.
Can anyone point me in the right direction on this?
Thanks!
Some of the more experienced SQL gurus will probably chime in with a better way, but you could always: