Reply to Trigger?

Your name:

Reply:


Posted by Bethany Holliday on 01/24/06 20:14

Hi All,

I have been working with SQL Server for some time - but until now
haven't tried to implement a trigger and am not sure if this is an
appropriate use. Any advice would be greatly appreciated.

I have this table: almis.dbo.aadata_x

when almis.dbo.aadata_x is updated, I want to automatically be able to
update a table in another database using this sql (only pulling
specifics from this table - not everything):

insert into dbname.dbo.tablename
select stfips as statefips, right(area, 3) as countyfips, periodyear,
race, gender, cenoccgrp, population, laborforce, emplab, unemp,
unemprate, pctpop, pctlabforce, pctemplab, pctunemp, pcttotlabforce,
pcttotemplab, pcttotunemp from aadata_x
where areatype = 04 and periodyear = 2000
and stfips = 18

I apologize in advance if this is too basic of a question -- but this is
something I need to be able to do in many cases .. on update of table1
.. update certain fields in another table - perhaps in the same
database, perhaps not.

Again - thanks for any input you might be able to give me.

B


*** Sent via Developersdex http://www.developersdex.com ***

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация