Viewing 15 posts - 136 through 150 (of 173 total)
Do you need to check for inserts also?
create trigger trg_members_upd ON members
AFTER INSERT
AS
declare @memberNbr int, @status1 int, @status2 int
set @memberNbr = 0
WHILE exists (select * from inserted where memberNbr >...
November 6, 2006 at 3:59 pm
Pretty sure i do not want to run this against mucho rows but...
declare @values varchar(1000), @sIdx1 int
set @sIdx1 = 0
declare @myVal table (id int identity, rptr varchar(10))
set @values =...
November 3, 2006 at 8:25 am
This may do the trick
SELECT convert(varchar(10), citrixfarm.SDB_SESSION.SESSIONSTART, 103),
count(*) mycount
FROM citrixfarm.SDB_SESSION
INNER JOIN
citrixfarm.LU_APPNAME
ON
citrixfarm.SDB_SESSION.FK_APPNAMEID = citrixfarm.LU_APPNAME.PK_APPNAMEID
WHERE...
November 2, 2006 at 9:32 am
This is a stab at it. But I'm sure I am missing a rule...
create view v_yada
as
select personid, chd1.id, chd2.id
from master
left join
(select personid, id from child where id = 1)...
October 31, 2006 at 2:51 pm
select voterid, questiontest,
case when tab1.answertext is not null then tab1.answertext when tab2.answertext is not null then tab2.answertext end as answertext
from yada
October 31, 2006 at 2:46 pm
Are you trying to get a row for each person with all id's. Basically de-normalize and have a list personid, id1, id2, id3....?
If so then you are talking
child
1. ...
October 31, 2006 at 2:04 pm
thanks, guess I was just confirming that my eyes were focused...
October 31, 2006 at 1:51 pm
If I am reading the specs correctly... no need for a derived table / sub query
SELECT yada...
FROM dbo.tbl_NSP_QuestionTree
WHERE QuestionNoteTypeUID 6 OR
(QuestionNoteTypeUID = 6 AND ParentUID QuestionTreeUID)
October 4, 2006 at 3:18 pm
For multiple inserts/updates
CREATE trigger UpdateWinMasterDueList on dbo.[Manager_List]
for INSERT, UPDATE
as
begin
Update tblWinMasterDueList set mst.Manager= ist.Manager
FROM tblWinMasterDueList mst INNER JOIN @Insert ist ON mst.jobCostCenter = ist.home_jobcost_nbr
end
September 21, 2006 at 1:07 pm
#1
I would look at the table defs for tblWinMasterDueList, possibly some of the fields are different lengths then similar fields on ManagerList.
#2
The trigger is not built for mulitple inserts.
September 21, 2006 at 1:01 pm
If you only want time then store the 11:00.
It will store 1900/01/01 11:00 (or something similar). But always remember when using that field, the data is mis-leading unless...
September 21, 2006 at 9:19 am
Informational:
My desktop has both SQLExpress2005 & SQL2005 installed, new desktop, new job. When connecting I failed to connect-the-dots that it was my machinename/sqlexpress. I connected to SQL (versus...
September 19, 2006 at 12:43 pm
The default database is set to the correct database.
The id used to go against the SQL2000 was sa. The ID for SQL2005 is domain/user.
thanks, still looking...
September 19, 2006 at 8:44 am
The MMC is the enterprise consule. Basically right click on the database and script to file. It should let you select all objects.
The 2nd option appears to work...
August 30, 2006 at 10:15 am
You can script all database objects into one file. Then simply search through the file for all objects. Works with the MMC plugin for 7/2000.
August 30, 2006 at 9:12 am
Viewing 15 posts - 136 through 150 (of 173 total)