Cascading Updates in SQL Server 6.5 and 7.0 
Author Message
 Cascading Updates in SQL Server 6.5 and 7.0
From what I have been reading, there doesn't appear to be a mechanism for
cascading updates in 6.5 -- is this true?

The best I can tell is that it accomplishes referential integrity for this
by  not allowing updates to keys on records with children rather than
allowing the update and cascading the changes to the related records.
Please let me know if this is not true.

Also, what about 7.0?

Thanks in advance,

David



Sun, 10 Jun 2001 03:00:00 GMT
 Cascading Updates in SQL Server 6.5 and 7.0

David,

Quote:
> Subject: Cascading Updates in SQL Server 6.5 and 7.0

Q.  Where are the cascade update/delete functions in SQL Server?
(v1.0   25.09.1998)

A.  There aren't any I'm afraid.  These were initially thought to be going into
SQL 7 but won't be there now.  They will be in a "future" SQL release.

You need to implement your own cascade functionality with triggers.  See
Q142480 in the MS Kb for more information on this and the ways to work with
foreign keys which cause problems due to the way that triggers work/fire.

 Neil Pike MVP/MCSE.  Protech Computing Ltd
 (Please post ALL replies to the newsgroup only unless indicated otherwise)
 For SQL FAQ entries see www.ntfaq.com/sql.html
 and http://www.swynk.com/faq/sql/sqlserverfaq.asp
 and GO MSSQL lib 1 on Compuserve



Mon, 11 Jun 2001 03:00:00 GMT
 Cascading Updates in SQL Server 6.5 and 7.0
You are correct - you would have to program triggers in both SQL Server 6.5
and SQL Server 7.0.

--
Richard Waymire, MCT, MCSE+Internet, MCSD

Quote:

>From what I have been reading, there doesn't appear to be a mechanism for
>cascading updates in 6.5 -- is this true?

>The best I can tell is that it accomplishes referential integrity for this
>by  not allowing updates to keys on records with children rather than
>allowing the update and cascading the changes to the related records.
>Please let me know if this is not true.

>Also, what about 7.0?

>Thanks in advance,

>David



Fri, 15 Jun 2001 03:00:00 GMT
 Cascading Updates in SQL Server 6.5 and 7.0
Not True:

I don't know if I've misunderstood your question... however assuming that I
haven't, the answer lies in Sql 'triggers'.

Triggers are an incredibly powerful tool in maintaining RI. Whenever you
write to a table, three triggers are fired, in which you can write T-SQL
code. They fire on Insert, Update and Delete. Pretty much anything is
possible. EG: in our enterprise when a record is added in one table...
Triggers calculate related information and record it in half a dozen other
tables as well.



Sun, 24 Jun 2001 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Cascading Update SQL Server 7.0 Stored Procedure

2. Cascading Update, delete SQL Server 7.0

3. MS SQL 6.5: Declarative Referential Integrity / Cascading Update

4. ERwin 2.5 Cascading Deletes/Updates with MS SQL 6.5

5. Use of SQL Server 7.0 Client with SQL Server 6.5 Server

6. Registering a SQL Server 6.5 from SQL Server 7.0

7. Upgrade from SQL Server 6.5 +SP5a (in french) to SQL Server 7.0 (US)

8. HEEEEEEELPPPPP!!! Sql Server 7.0 / Sql Server 6.5

9. ERROR 16940 IN SQL SERVER 7.0 BUT NOT IN SQL SERVER 6.5

10. Converting SQL Server 7.0 Scripts to SQL Server 6.5

11. SQL Server 7.0 versus SQL Server 6.5

12. ERROR 16940 IN SQL SERVER 7.0 BUT NOT IN SQL SERVER 6.5


 
Powered by phpBB® Forum Software