Click here to Skip to main content
15,886,199 members
Home / Discussions / Database
   

Database

 
GeneralRe: sql to export access table to html file Pin
afronaut24-Oct-04 6:46
afronaut24-Oct-04 6:46 
GeneralMS OLAP Visual C++ (.NET) samples Pin
Ilgar22-Oct-04 23:43
Ilgar22-Oct-04 23:43 
GeneralProblem with SQL Server RaiseError with C# Pin
Graham W22-Oct-04 0:58
Graham W22-Oct-04 0:58 
GeneralSQL statement against MS access Pin
21-Oct-04 14:20
suss21-Oct-04 14:20 
GeneralRe: SQL statement against MS access Pin
afronaut21-Oct-04 14:43
afronaut21-Oct-04 14:43 
GeneralRe: SQL statement against MS access Pin
jlawren721-Oct-04 15:53
jlawren721-Oct-04 15:53 
GeneralRe: SQL statement against MS access Pin
afronaut24-Oct-04 6:11
afronaut24-Oct-04 6:11 
GeneralRecursive Triggers Pin
afronaut21-Oct-04 13:33
afronaut21-Oct-04 13:33 
Hey all, just for giggles, I was trying to figure out how these works. I created the following table:

Create Table Emps(<br />
	EmployeeID int identity(1,1),<br />
	EmpName	varchar(100), <br />
	ManagerID	int, <br />
	ActiveFlag	char(1)<br />
)


insert into emps(empname)values('Big Boss')<br />
insert into emps(empname, managerid)values('David', 1)<br />
insert into emps(empname, managerid)values('Holly', 2)<br />
insert into emps(empname, managerid)values('Samwell', 3)<br />
insert into emps(empname, managerid)values('Ian', 4)


-- set everyone active
update emps set activeflag = 'Y'

CREATE TRIGGER EmpTrig ON emps For UPDATE <br />
AS<br />
UPDATE Emps  SET ActiveFlag= i.activeflag <br />
FROM (Emps e INNER JOIN Inserted i ON e.managerid = i.employeeid)<br />
GO


The idea was that this would set everyone in a heirarchy "Inactive" if the manager was set inactive. Unfortunately, it does this only one level deep. How can I enable recursive triggers?

Thanks in advance -

*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
GeneralRe: Recursive Triggers Pin
WoutL22-Oct-04 1:25
WoutL22-Oct-04 1:25 
GeneralSQL query - deleting main row, its related rows, and their related rows Pin
Luis Alonso Ramos21-Oct-04 8:58
Luis Alonso Ramos21-Oct-04 8:58 
GeneralRe: SQL query - deleting main row, its related rows, and their related rows Pin
TimWallace21-Oct-04 9:32
TimWallace21-Oct-04 9:32 
GeneralRe: SQL query - deleting main row, its related rows, and their related rows Pin
Luis Alonso Ramos21-Oct-04 9:53
Luis Alonso Ramos21-Oct-04 9:53 
GeneralADO question Pin
Tom Wright21-Oct-04 5:32
Tom Wright21-Oct-04 5:32 
GeneralDatalist with pages Pin
David Fawn21-Oct-04 5:03
David Fawn21-Oct-04 5:03 
QuestionWhy won't this update to my Database? Pin
fortyonejb21-Oct-04 4:52
fortyonejb21-Oct-04 4:52 
Generalupdating a database in C# Pin
steve_rm21-Oct-04 4:10
steve_rm21-Oct-04 4:10 
GeneralVB, ADO, XP - Which one is falling over?! Pin
Pete Belcher20-Oct-04 23:04
Pete Belcher20-Oct-04 23:04 
GeneralRe: VB, ADO, XP - Which one is falling over?! Pin
Michael Potter21-Oct-04 5:05
Michael Potter21-Oct-04 5:05 
GeneralSimple Question on Oracle dbms_utility.get_time Pin
devvvy20-Oct-04 20:34
devvvy20-Oct-04 20:34 
GeneralRe: Simple Question on Oracle dbms_utility.get_time Pin
DiWa20-Oct-04 22:44
DiWa20-Oct-04 22:44 
QuestionDatasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com20-Oct-04 12:03
david@mindplay.com20-Oct-04 12:03 
AnswerRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay20-Oct-04 22:00
Colin Angus Mackay20-Oct-04 22:00 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 8:16
david@mindplay.com21-Oct-04 8:16 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 11:44
Colin Angus Mackay21-Oct-04 11:44 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:11
david@mindplay.com21-Oct-04 12:11 

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.