Home > Archive > MS SQL Server > March 2006 > How to update tables with a newer version









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to update tables with a newer version
Diego F.

2006-03-05, 8:23 pm

Hi all. I have that problem:

I have a database that other person is updating. I have my tables with data,
and a new version of the whole database.

Is there a way to update the tables so they reflect the changes? If not, I
should do it manually, seeing if some fields have changed, relations...

Is there a way to do it manually?

--
Regards,

Diego F.


Uri Dimant

2006-03-05, 8:23 pm

Diego
If I understood you properly you need something like that

UPDATE TableName1 SET
Factory=t2 .factoryno,Dept=t2 .deptno
FROM TableName2 t2 INNER JOIN TableName1 t1
ON t1.Empno=t2.Employeeno AND
( t1.Factory<>t2.factoryno OR t1.Dept<>t2.deptno OR.........)




"Diego F." <diegofrNO@terra.es> wrote in message
news:e2bThcfPGHA.2124@TK2MSFTNGP14.phx.gbl...
> Hi all. I have that problem:
>
> I have a database that other person is updating. I have my tables with
> data, and a new version of the whole database.
>
> Is there a way to update the tables so they reflect the changes? If not, I
> should do it manually, seeing if some fields have changed, relations...
>
> Is there a way to do it manually?
>
> --
> Regards,
>
> Diego F.
>
>



Diego F.

2006-03-05, 8:23 pm

The fact is that I have many tables, so I'm looking for a kind of wizard to
do that. Is it possible?

It is possible also to have new relationships.

--
Regards,

Diego F.


"Uri Dimant" <urid@iscar.co.il> escribió en el mensaje
news:OZ56jifPGHA.428@tk2msftngp13.phx.gbl...
> Diego
> If I understood you properly you need something like that
>
> UPDATE TableName1 SET
> Factory=t2 .factoryno,Dept=t2 .deptno
> FROM TableName2 t2 INNER JOIN TableName1 t1
> ON t1.Empno=t2.Employeeno AND
> ( t1.Factory<>t2.factoryno OR t1.Dept<>t2.deptno OR.........)
>
>
>
>
> "Diego F." <diegofrNO@terra.es> wrote in message
> news:e2bThcfPGHA.2124@TK2MSFTNGP14.phx.gbl...
>
>



Terri

2006-03-05, 8:24 pm

If I understand you correctly you have two different databases and you want
to compare and synchronize. This third party tool can do this.
http://www.red-gate.com/products/SQ...mpare/index.htm

Otherwise you would have to write the code yourself.


"Diego F." <diegofrNO@terra.es> wrote in message
news:%23wCN3ygPGHA.2336@TK2MSFTNGP12.phx.gbl...
> The fact is that I have many tables, so I'm looking for a kind of wizard

to
> do that. Is it possible?
>
> It is possible also to have new relationships.
>
> --
> Regards,
>
> Diego F.
>
>
> "Uri Dimant" <urid@iscar.co.il> escribió en el mensaje
> news:OZ56jifPGHA.428@tk2msftngp13.phx.gbl...
not,[color=darkred]
relations...[color=darkred]
>
>




Diego F.

2006-03-05, 8:24 pm

I'll try to explain better.

I'm working with a large database (about 300 tables). Other person is
updating the database structure (adding some fields to tables, maybe new
relationships...) and I have a backup of that new version.

I need to upgrade my database. I discard the option of adding all that
changes manually. I ask for a tool that can update that changes without
losing the tables rows or relationships between tables.

The only thing that I can think about is creating a new database with the
backup and moving the data from one DB to the other, but I'm not sure about
how to do that.

--

Regards,

Diego F.


"Terri" <terri@cybernets.com> escribió en el mensaje
news:du9q1b$14c$1@re
ader2.nmix.net...
> If I understand you correctly you have two different databases and you
> want
> to compare and synchronize. This third party tool can do this.
> http://www.red-gate.com/products/SQ...mpare/index.htm
>
> Otherwise you would have to write the code yourself.
>
>
> "Diego F." <diegofrNO@terra.es> wrote in message
> news:%23wCN3ygPGHA.2336@TK2MSFTNGP12.phx.gbl...
> to
> not,
> relations...
>
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com