well, for anyone who was following this thread, the triger format i was looking for is:
create trigger triggername on tablename
instead of update
as
begin
update tablename
set enabled=0
from tablename inner join inserted on tablename.[idfield]=inserted.[idfield]
insert into tablename ([all...
sounds like you have this figured out, but .. out of curiosity, why are you storing the session id in the DB? and if the reason for the storing the sessionid is valid, why are you indexing against it, and even more so, why are you storing it in the table that has all the non logged in users...
ya i definately want it set up so that in the case of passwords, the same password cant be used 2x. or at least a user specified amount (for a group policy). Adding a 'lastPassword' column would become an issue as the various 'policy makers' in the system would have different #'s to use. so at...
nice that noone responded to ya ;)
try this:
create trigger moveLeavers on employee.dbo.master
for update as
if (select leaveDate from inserted) < getDate()
UPDATE EMPLOYEE.dbo.LEAVERS
SET JOB = JOBTITLE
STARTDATE = CONVERT(Char,b.DATEOFJOIN,103)
FROM EMPLOYEE.dbo.LEAVERS a JOIN inserted b
ON...
thats great! but doesnt that kind of limit the effectiveness of the stored procedure? for example a developer might want to use the stored procedure:
getRelatedBooks(bookID)
to get the possible related books to the one being viewed, however by forcing the 'option' tags around the data, it...
hi all, i'm trying to set up a system where data isnt deleted in certain tables in the database (i know.. visions of lotus notes are popping through your heads ;) ... )
here's an example of why:
tblUsers (userID, firstname, lastname, DOB, username, password, enabled, dteModified)
i'd like to...
to the best of my knowledge, you arent going to be able to achieve those results thorugh a query simply because any way you relate those 2 non unique key's you are going to generate 4 records. 1=1 every time there.
the best 2 options i think you can get are:
select table1.id, "table1.top 2"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.