Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Old and New values in trigger

Author  Topic 

scottdp3
Starting Member

3 Posts

Posted - 2011-05-04 : 19:02:30
Ok, I admit that I am an Oracle guy trapped into Microsoft SQLServer.

In Oracle I have :new and :old to refer to a column name. What I want to do is move a value from column A into Column B when Column A is updated.

I just can't find this in T-SQL. Simple question I am sure, but your help will be deeply appreciated.

...Scott

...Scott

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-05-04 : 19:33:55
Look up Inserted and Deleted tables in Books Onloine (BOL). Same concept just different names.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)
Go to Top of Page

scottdp3
Starting Member

3 Posts

Posted - 2011-05-05 : 14:04:12
quote:
Originally posted by Bustaz Kool

Look up Inserted and Deleted tables in Books Onloine (BOL). Same concept just different names.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)



Thanks! I didn't make the connection to inserted and deleted tables. That is the bump that I needed.

...Scott
Go to Top of Page
   

- Advertisement -