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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignore error in trigger...

Status
Not open for further replies.

RollingMoose

Programmer
May 13, 2002
73
US
Here's what we're trying to accomplish.

We have an insert trigger that fires when new data enters a table from another server. The trigger creates a join to another database to extract a piece of data that updates a field in our table. However, if that join can't be created an error occurs and the transaction is rolled back (sometimes that database is taken offline).

What we'd like to happen is if an error occurs, allow the new data to populate our table and leave the field we're trying to update blank.

Hope that makes sense...any suggestions or advice is appreciated.
 
You can check master..sysdatabases to see if the database is there and put the update in dynamic sql.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top