Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can use TRIGGER to effect other DB?

Status
Not open for further replies.

itay

Programmer
Jul 3, 2001
2
0
0
IL
how can use TRIGGER to effect table in other DB?

i know i cann't use the USE 'db name'
operator, so what should i use??

thanx itay...
 
You would get a better answer in the SQL Server forum. But anyway...

You can fully qualify tables by using dbname.dbo.tablename instead of just tablename (assuming dbo is the owner of the table).

If the databases are on different servers, you need to put the server name in the front of the path [servername].dbname.dbo.tablename, but you also have to define the servers as linked servers in SQL Server so that they can contact each other and pass data. Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Hi,

The syntax within your trigger would go something like this:

Select a.column1,
b.column2
From dname..tablename a, dbname2..tablename2 b
where...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top