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

If anyone can help with my ms sql 2

Status
Not open for further replies.

ironvid

IS-IT--Management
Sep 2, 2003
10
GB
If anyone can help with my ms sql 2000 I have this question:-

I am designing two tables :

Batch
Documnets

In both tables i have two fields called "page" and "name"

all the names in the name field are unique

How can I design the page field in the batch table to be updated with the information from the page field in the documents table automaticlly where the name field match's

How this makes sense

please make it simple still a newbie

thanks....

 
update Batch
set Batch.page = Documents.page
where Batch.name = Documents.name


Dickie Bird (:)-)))
 
thanks DickieBird

update Batch
set Batch.page = Documents.page
where Batch.name = Documents.name

where do i enter this I am a complete newbie to this !!!

In other words an idot

the more info the better it will help me learn

thanks.....
 
Look in the Books OnLine (BOL), use the Index tab and enter CREATE TRIGGER.

If I understand you correctly, you need a trigger on the DOCUMENTS table that will cause the BATCH table to be updated when matching data is inserted into the DOCUMENTS table.

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top