March 8, 2005 at 10:53 pm
I have OLD and NEW databases. I have added few data to the NEW database. Now I need to compare with the OLD database and whatever extra data I have in NEW should be moved to OLD.
Clue me in with a example
Thanks
Raman
March 10, 2005 at 2:36 am
redgate sql compare will do the job and theres a 14 day trial.
Phil Nicholas
March 10, 2005 at 2:37 am
sorry its a different redgate tool to do content, sql compare does structure!
Phil Nicholas
March 10, 2005 at 8:36 am
I have done something like this:
Insert INTO TrustChecks (
CheckNumber,
Amount,
ClearedDate,
ClearedStatus)
SELECT
ClearedChecks.CheckNumber,
ClearedChecks.Amount,
ClearedChecks.CheckDate,
'C'
FROM ClearedChecks
Left Join TrustChecks
On TrustChecks.CheckNumber = ClearedChecks.CheckNumber
where TrustChecks.CheckNumber is NULL
Only inserts the entries from the old table when the check number is null. All other entries are ignored.
March 10, 2005 at 9:35 am
RedGate's tools are pretty good but I'm particularly fond of AdeptSQL tools. Plus, their package will do data and schema compares. And it's blindingly fast...
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply