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 2000 Forums
 SQL Server Development (2000)
 Trigeer Priger

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-06-24 : 07:25:12
balu writes "Hi,
I have 2 tables
one table
--------------
id, email1

another table
--------------
email2

I need to compare 1st table email1 and second table email2 and add max(id) + 1.

I need to write trigger
Pls help me

Balu"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-06-24 : 07:34:25
i've a feeling you misunderstand what triggers are for....
however....supply sample input data and matching expected results....and this MAY get moved onwards to your satisfaction.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-06-24 : 09:46:00
You need to write a query that does this for you, run it once to fix your data, then fix your application so you never have to do this again. Nope...not a case for a trigger, unless you have explained it completely wrong.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -