Click here to Skip to main content
15,890,995 members
Home / Discussions / Database
   

Database

 
QuestionGetDefaultConnect() in CRecordset? Pin
Le@rner30-May-08 19:31
Le@rner30-May-08 19:31 
AnswerCP NOTE Pin
leckey31-May-08 16:41
leckey31-May-08 16:41 
QuestionQuestion Regarding .Load() Pin
Jammer30-May-08 14:25
Jammer30-May-08 14:25 
QuestionUpdate Pin
Bassam Saoud30-May-08 9:41
Bassam Saoud30-May-08 9:41 
AnswerRe: Update Pin
Blue_Boy30-May-08 11:35
Blue_Boy30-May-08 11:35 
AnswerRe: Update Pin
Alsvha30-May-08 20:26
Alsvha30-May-08 20:26 
QuestionUpdate Triggers and recursion with multiple rows Pin
Steven J Jowett30-May-08 5:28
Steven J Jowett30-May-08 5:28 
AnswerRe: Update Triggers and recursion with multiple rows Pin
Rob Smiley30-May-08 13:01
Rob Smiley30-May-08 13:01 
Hi, try something like this:

CREATE TRIGGER [Table1_Update] ON [dbo].[Table1] 
FOR UPDATE
AS

IF EXISTS(SELECT * FROM inserted)
	UPDATE Table1 SET [Name] = I.[Name] FROM Table1 T INNER JOIN inserted I ON T.ParentID = I.ID


You're right in that the trigger recurse option needs to be enabled (disabled by default), but be aware that you're limited to 32 levels in the recursion stack (sql server 2000 - don't know limit in SQL2005), so you're tree must be limited to max 32 levels

"An eye for an eye only ends up making the whole world blind"

GeneralRe: Update Triggers and recursion with multiple rows Pin
Steven J Jowett1-Jun-08 22:45
Steven J Jowett1-Jun-08 22:45 
AnswerRe: Update Triggers and recursion with multiple rows Pin
Mycroft Holmes31-May-08 2:31
professionalMycroft Holmes31-May-08 2:31 
GeneralRe: Update Triggers and recursion with multiple rows Pin
Steven J Jowett1-Jun-08 22:44
Steven J Jowett1-Jun-08 22:44 
GeneralRe: Update Triggers and recursion with multiple rows Pin
Mycroft Holmes1-Jun-08 23:17
professionalMycroft Holmes1-Jun-08 23:17 
QuestionSQL-Instead of null value I have to display the text like NO Pin
r aa j29-May-08 23:58
r aa j29-May-08 23:58 
AnswerRe: SQL-Instead of null value I have to display the text like NO Pin
Peter Josefsson Sweden30-May-08 0:43
Peter Josefsson Sweden30-May-08 0:43 
GeneralRe: SQL-Instead of null value I have to display the text like NO Pin
r aa j30-May-08 1:03
r aa j30-May-08 1:03 
AnswerRe: SQL-Instead of null value I have to display the text like NO Pin
Alsvha30-May-08 0:56
Alsvha30-May-08 0:56 
AnswerRe: SQL-Instead of null value I have to display the text like NO Pin
Giorgi Dalakishvili30-May-08 1:16
mentorGiorgi Dalakishvili30-May-08 1:16 
GeneralRe: SQL-Instead of null value I have to display the text like NO Pin
Hesham Amin1-Jun-08 12:27
Hesham Amin1-Jun-08 12:27 
AnswerRe: SQL-Instead of null value I have to display the text like NO Pin
Hesham Amin1-Jun-08 12:24
Hesham Amin1-Jun-08 12:24 
QuestionWeird nullable DateTime issue... Pin
Harvey Saayman29-May-08 21:43
Harvey Saayman29-May-08 21:43 
AnswerRe: Weird nullable DateTime issue... Pin
Peter Josefsson Sweden30-May-08 1:00
Peter Josefsson Sweden30-May-08 1:00 
QuestionGetting size of database programatically using C# or VB.NET Pin
Zerox MXI29-May-08 21:35
Zerox MXI29-May-08 21:35 
AnswerRe: Getting size of database programatically using C# or VB.NET Pin
Hesham Amin30-May-08 5:23
Hesham Amin30-May-08 5:23 
Questionun-cooperative DataSets & TableAdapters Pin
ghazanfarKhan29-May-08 8:23
ghazanfarKhan29-May-08 8:23 
QuestionLotus Notes to SQL Replication Pin
madhuGM29-May-08 5:09
madhuGM29-May-08 5:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.