Viewing 15 posts - 4,471 through 4,485 (of 10,144 total)
avishain (6/24/2013)
J Livingston SQL (6/24/2013)
also what are you expecting to happen when the end time is two or...
June 24, 2013 at 7:30 am
While you're investigating JLS' questions, this is worth playing with:
SELECT
[DTstart date],
[DTend date],
SecondsDifference = DATEDIFF(second,[DTend date],[DTstart date]),
SecondsDifference = ABS(DATEDIFF(second,[DTstart date],[DTend date]))
FROM (
SELECT
[DTstart date] = CONVERT(DATETIME,STUFF(STUFF(CAST(d.[start date] AS VARCHAR(8)),3,0,':'),6,0,':'),114),
[DTend date]...
June 24, 2013 at 6:34 am
Can you post the actual plan (not the estimated plan) for this batch, please?
-- Determine what is in the patch container
SELECT TOP(1000) DISTINCT M_SCNTYPE, M_FAMILY0, M_MLABEL0, M_SLABEL0, ContainerID = @TargetContainerID
INTO...
June 24, 2013 at 4:32 am
Jan Van der Eecken (6/21/2013)
Now why does this InlineTally function look so familiar? 😉
Same reason as Feynman diagrams are now so familiar, Jan 😉
June 21, 2013 at 2:31 am
ashwinboinala (6/20/2013)
i am getting this value from sysjobhistroy table from msdb there its in int format if u can give me solution where i can filter that table thats fine
SELECT...
June 20, 2013 at 9:27 am
You might need an input style for CONVERT:
;WITH Sampledata AS (
SELECT lastrundate = CAST(20130620 AS INT)
)
SELECT
lastrundate_INT = lastrundate,
lastrundate_CHAR8 = CAST(lastrundate AS CHAR(8)),
lastrundate_DATE = CONVERT(DATE, CAST(lastrundate AS CHAR(8)),112)
FROM Sampledata
June 20, 2013 at 9:25 am
Sean Lange (6/20/2013)
Is there a question here?
Yes there is, but not up there 😉
June 20, 2013 at 9:18 am
Venkata-433090 (6/19/2013)
Thanks for your response. Its kind of when the client retrieves the data.again, the 32 character count should start from where the pipe was placed.
Shouldn't take too much...
June 20, 2013 at 8:53 am
sagesmith (6/18/2013)
What I haven't seen is this "inverse relationship" i.e. where the rCTE fails to scale. Do you have an example?
The first article by Jeff Moden in your signature makes...
June 18, 2013 at 9:12 am
whenriksen (6/18/2013)
If "Show Actual Execution Plan" is set prior to executing the code and then both the queries (the CURSOR based one and the recursive CTE based one) are executed,...
June 18, 2013 at 8:53 am
sagesmith (6/18/2013)
ChrisM@Work (6/18/2013)
sagesmith (6/18/2013)
June 18, 2013 at 7:55 am
T.Ashish (6/18/2013)
While testing a query when we run it second time, it uses cache so performs better then previous run.
...
June 18, 2013 at 6:27 am
This appears to work:
SELECT
ID = ROW_NUMBER() OVER(ORDER BY MIN(DateRange)),
Employee, Job, [Workload],
StartDate = MIN(DateRange),
EndDate = MAX(DateRange)
FROM (
SELECT ID, Employee, Job, [Workload], DateRange,
Grouper = DENSE_RANK() over (order by...
June 18, 2013 at 6:17 am
sagesmith (6/18/2013)
June 18, 2013 at 6:13 am
Jonathan AC Roberts (6/18/2013)
insert into dbo.def (SeqNo, Date_Field, Payment)
SELECT A.Seqno, X.Date_Field, A.Payment
FROM dbo.abc A
CROSS APPLY (SELECT DATEADD(mm, T.N,...
June 18, 2013 at 3:58 am
Viewing 15 posts - 4,471 through 4,485 (of 10,144 total)