Viewing 15 posts - 16 through 30 (of 52 total)
Sean Lange (5/29/2015)
sarath.tata (5/29/2015)
Sean Lange (5/29/2015)
May 29, 2015 at 9:47 am
Sean Lange (5/29/2015)
May 29, 2015 at 9:31 am
Just in case somebody wants
DECLARE @StartDate DATE
DECLARE @EndDate DATE
DECLARE @RotationDays INT
SET @StartDate = '01/01/2015'
SET @EndDate = '12/31/2015'
SET @RotationDays = 4
;WITH result AS
(
SELECT DATEADD(DAY, (ROW_NUMBER() OVER...
May 29, 2015 at 8:27 am
Eric M Russell (5/29/2015)
May 29, 2015 at 7:46 am
I have found a solution. Not so sure, if it is the best solution!!
DECLARE @StartDate DATE = '01/01/2015'
, @EndDate DATE = '01/08/2015'
SET @StartDate = DATEADD(DAY, -7, @StartDate)
;WITH...
May 29, 2015 at 7:40 am
Is this solution efficient?
DECLARE @NextNumber BIGINT
BEGIN TRAN
SELECT @NextNumber = NextNumber FROM tblOnboardingSequence WITH (HOLDLOCK, ROWLOCK) WHERE Name = 'TPO'
UPDATE tblOnboardingSequence SET NextNumber = @NextNumber + 1 WHERE Name = 'TPO'
COMMIT...
May 12, 2015 at 9:54 am
I don't understand the reason but when I removed alias in column name it worked!!
SELECT DutyRosterPeriodID, StartDate, EndDate, CASE WHEN HolidayDate IS NULL THEN 0 ELSE 1 END...
April 6, 2015 at 12:04 pm
I can't use global temp variables as it differs per request.
if my query is in @sql, so far I could find the way to pre-create temp...
April 6, 2015 at 12:00 pm
I could n't give complete executable query as it is part of a dynamic query which requires plenty of tables.
This is my pivot. Do you think I missed some...
April 6, 2015 at 11:57 am
It is strange!! I had this query as part of another Pivot query. The error might be because of that. I need to look into this now. ...
April 6, 2015 at 11:54 am
Nice work
Steven Willis (12/7/2010)
March 27, 2015 at 10:48 am
I think I may better use Left in stead of Replace
SELECT
CASE WHEN CHARINDEX(' ', Supervisor, CHARINDEX(' ', Supervisor, 0) + 1) > 0 THEN
LEFT(Supervisor, CHARINDEX(' ', Supervisor, CHARINDEX(' ',...
March 23, 2015 at 9:29 am
It seems the weekend break worked for me to think fresh!!
I glanced through the query and found that I'm using joins on the columns that are not indexed and as...
March 9, 2015 at 10:12 am
Thanks for your ideas. I'll look into them. By the way, do you mean this below on the usage of alias in UPDATE?
UPDATE asft SET LastRemoved =...
March 6, 2015 at 9:02 pm
You are absolutely correct!! I realized later that my posted query has no impact but the one in the error log has created deadlock!! Any guesses how to tune that?
It...
March 6, 2015 at 8:42 pm
Viewing 15 posts - 16 through 30 (of 52 total)