Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!
Lets say I inserted INSERT into NewMem Values ('123-46-7844', 'Duncan', 'Tim', '345 445-5645', '32 Sun Dr.', 'Phoenix', 'AZ', '38575',...
The table is there, just not viewable from the folder (but when I do code it can display when I ask it to). What I don't understand how to do...
Yes it is an assignment,that is basically impossible for me, and I have been trying at it for hours, looking at class notes/the book, and none of...
I ran it as it was..... it said succesful, but i cant seem to find the table lol? Is it under a diff folder name?:D
The problem is it has in that code, CREATE TABLE [NewMem] ( [SSN] [char] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [lname]...
Yes. For some reason, when I run the trigger code it states Server: Msg 207, Level 16, State 1, Procedure UpdateMemberCount, Line 7 Invalid...
So should I first execute the trigger (with all three components) and then write code that will insert, edit, delete rows in the members table?...
To create the NewMems table would I just do something like Create Table NewMems...... The thing is I was given the members table, so I...
So is what you have above basically 2 pieces of code or three? The three pieces you wrote before this one has that error you mention?
Im starring to think maybe those 3 seperate statements would be a good way of doing it. But how would I create the new table (Test putting...
How would I create the NewMem "(Test putting in several rows by creating a new table, NewMem with the same head as the members table, putting...
The question is Write a trigger that maintains the correct values of NumMems on update (of the groupid column in the members table), or on...
How can I combine this trigger to include all of the inerseting, updating and deleting? Your mentioned trigger is only for delete right?
the trigger should automatically update the groups table, affecting only those rows which had changes in the number of members in the group. This...
CREATE TRIGGER MembersDelete ON members After Delete AS Update groups set NumMems = (Select count(*) from members where groupid=...
Im supposed to test the trigger by inserting rows in the members table, deleting rows from the members table, updating a row by changing the...
An update statement may change the groupid in this case. So would this still be ok?
Is the update and deleting factored in? I ran that code and it said it did it succesfully, but what did do exactly, do I need to TEST by trying...
I want to write a trigger that maintains the correct values of NumMems on update (of the groupid column in members table), or on insert or delete...
you familiar with triggers -- so that the groupid column can maintain the correct values on update....?