Viewing 15 posts - 76 through 90 (of 142 total)
Many options here.
I would probably first off
select ...
where Active = 1
and that active logic
UNION ALL
select ...
where Active = 0
and inactive logic
ORDER BY ...
March 28, 2008 at 9:19 am
you can track this by running profiler over the server / database that is being connected to via the web app.
you can see the sql in the text data column...
February 14, 2008 at 10:53 am
check for triggers
check for tempdb locking (such as creating temp tables with long running queries doing a select ... into #table....)
February 14, 2008 at 10:44 am
I believe I had to actually create the procedures with the appropriate options before the problem was resolved, and not just set them within the procedure.
SET NUMERIC_ROUNDABORT OFF
SET ANSI_NULLS ON
SET...
February 12, 2008 at 5:22 am
One thing that limits the use of persited calculated columns is the many requirements it has, which can be a headache for legacy systems.
The main issue for legacy code is...
February 12, 2008 at 5:16 am
CREATE TABLE #Test ( fk_tbl_ip_address_id varchar(15) )
INSERT INTO #Test
select fk_tbl_ip_address_id
from tbl_visits
and startTime between '2007-01-11 00:00:00' and '2008-01-11 23:59:00'
...
January 24, 2008 at 10:52 am
try this
DELETE tblEnrollment
FROM tblEnrollment E
JOIN tblDupeIDs D ON E.EnrollmentID = D.EnrollmentID
AND E.UploadDate <> D.MaxUploadDate
January 24, 2008 at 10:48 am
put an errorhandler at the end of the batch script something like
Do stuff
call batch script
IF @rc <> 0
GOTO ErrHandler
do more stuff
GOTO Exit
ErrHandler:
...
January 24, 2008 at 10:43 am
you could also add SP:stmt starting / completing to your trace and execute it through the app and see what particular staement within the procedure is causing the delay...
January 24, 2008 at 10:39 am
you could also insert the non distinct hits to a temp table and aggregate against that as a test.
January 24, 2008 at 10:34 am
Some other ideas:
it sounds like you have to be able to report down to visits per day so you could
create a reporting table that gets updated each night for...
January 24, 2008 at 10:33 am
This snippet was created and posted by someone else who frequents this site. I wish I could remember who to give them credit.
It might be useful to you.
--===== Setup the...
December 20, 2007 at 10:12 am
For a while loop you could do something like....
SET NOCOUNT ON;
DECLARE @PHONEID INT
DECLARE @PERSONID INT
DECLARE @PERSLEGACYACCOUNTID INT
DECLARE @PHONETYPE VARCHAR(40)
DECLARE @PHONENUMBER VARCHAR(20)
INSERT INTO #TempPhone ( LoopId int IDENTITY(1,1) NOT NULL,
PHON_TYPE...
December 17, 2007 at 10:48 am
Some sample data would help... but try this.
SELECT
teste.tecnico,
teste.nome,
SUM(CASE WHEN teste.setor_dest= 'IRMOT' THEN...
December 13, 2007 at 10:58 am
It looks like it is working fine to me.
DECLARE @EmployeeId uniqueidentifier
SET @EmployeeId= NEWID()
INSERT INTO tblemployee VALUES ( @EmployeeId, 'Snow, John' )
EXEC sp_employeeReviewed @EmployeeId
SET @EmployeeId= NEWID()
INSERT INTO tblemployee VALUES ( @EmployeeId,...
December 11, 2007 at 10:42 am
Viewing 15 posts - 76 through 90 (of 142 total)