Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi Everyone, I have very small question. Actually I have two Databases on same SQL Server say DATABASE1 and DATABASE2. Both databases have one table called TABLE1 as exact copy. I am updating DATABASE1.TABLE1 using ASP code. I want DATABASE2.TABLE1 also to be updated with same data but not via ASP code. Is there any way of pulling or pushing data for TABLE1 only ? Kind Regards, Fayyaz
Post Follow-up to this message"Triggers are often used for enforcing business rules and data integrity. SQL Server provides declarative referential integrity (DRI) through the table creation statements (ALTER TABLE and CREATE TABLE); however, DRI does not provide cross-database referential integrity." FROM http://msdn.microsoft.com/library/d... /> 2_7eeq.asp HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- "FAYYAZ" <anyone@anyone.com> schrieb im Newsbeitrag news:OVFPMX%23SFHA.1896@TK2MSFTNGP14.phx.gbl... > Hi Everyone, > > I have very small question. > > Actually I have two Databases on same SQL Server say DATABASE1 and > DATABASE2. > > Both databases have one table called TABLE1 as exact copy. I am > updating > DATABASE1.TABLE1 using ASP code. I want DATABASE2.TABLE1 also to be > updated > with same data but not via ASP code. > > Is there any way of pulling or pushing data for TABLE1 only ? > > Kind Regards, > > Fayyaz > > >
Post Follow-up to this messageHope this will answer the problem: CREATE TRIGGER <TRIGGER> ON DATEBASE1.TABLE1 FOR UPDATE AS UPDATE DATEBASE2.TABLE1 SET DATEBASE2.TABLE1.COLUMN1 = INSERTED.COLUMN1 DATEBASE2.TABLE1.COLUMN2 = INSERTED.COLUMN2 DATEBASE2.TABLE1.COLUMN3 = INSERTED.COLUMN3 DATEBASE2.TABLE1.COLUMN4 = INSERTED.COLUMN4 DATEBASE2.TABLE1.COLUMN5 = INSERTED.COLUMN5 WHERE DATABASE2.TABLE1.PRIMARY_KEY = INSERTED.PRIMARY_KEY GO thanks and regards Chandra "FAYYAZ" wrote: > Hi Everyone, > > I have very small question. > > Actually I have two Databases on same SQL Server say DATABASE1 and > DATABASE2. > > Both databases have one table called TABLE1 as exact copy. I am updati ng > DATABASE1.TABLE1 using ASP code. I want DATABASE2.TABLE1 also to be update d > with same data but not via ASP code. > > Is there any way of pulling or pushing data for TABLE1 only ? > > Kind Regards, > > Fayyaz > > > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread