Viewing 15 posts - 1 through 15 (of 31 total)
Everything is working perfectly, thank you everyone!!
June 15, 2016 at 2:21 am
I have read through a few articles on stored procedure performance with parameters, variables and literals but still unable to understand why Parameters run faster than variables in the query...
June 2, 2016 at 11:36 pm
Sergiy (6/1/2016)
SELECT CONVERT(DATE, DT.[time slot]) date,
CONVERT(VARCHAR(20),DT.[time slot], 108) + '-' + CONVERT(VARCHAR(20),DATEADD(n, 30, DT.[time slot]), 108)
FROM (SELECT dateadd(n, datediff(n,0, GETDATE())/30*30, 0) as [time slot]
) DT
Is it what you're...
June 2, 2016 at 2:35 am
drew.allen (6/1/2016)
dateadd(dd, datediff(dd,0,b.start_time), 0) as [date]
dateadd(n,...
June 1, 2016 at 8:42 pm
Sergiy (6/1/2016)
It's so easy. 🙂
You group you'd events by day:
dateadd(dd,0, datediff(dd,0,b.start_time)) as [date]
But what you need...
June 1, 2016 at 10:16 am
John Mitchell-245523 (6/1/2016)
June 1, 2016 at 10:03 am
If I use presentation layer (crystal report in my case) to organize it, would it take longer time?
After chopping off the second portion, how could I compare the time?...
June 1, 2016 at 3:17 am
Date (start_time)--report_item----EN (lang)---BM (lang)
00:00 - 00:30-----Noisy----------------------3------------- 0
00:00 - 00:30-----No Dial Tone-------------6--------------2
00:30 - 01:00-----Noisy----------------------1--------------2
00:30 - 01:00-----No Dial Tone-------------0------------- 7
-----------------------------------------------------------------
My query is able to output the result as above but it is...
June 1, 2016 at 2:28 am
Thanks ! I wonder why I never thought of that !
May 31, 2016 at 11:14 pm
Sergiy (5/31/2016)
jc85 (5/31/2016)
WHERE month(b.start_time) = @Loc_MonthAND year(b.start_time) = @Loc_Year
Is there any other way to avoid using function in WHERE clause in this scenario?
It doesn't have huge impact on query speed...
May 31, 2016 at 9:41 pm
WHERE month(b.start_time) = @Loc_Month
AND year(b.start_time) = @Loc_Year
Is there any other way to avoid using function in WHERE clause in this scenario?
It doesn't have huge impact on query speed but as...
May 31, 2016 at 10:50 am
Sergiy (5/30/2016)
Should it be this?
SUM(CASE WHEN DT.lang = 'EN' THEN CASE a.report_item WHEN 'Noisy' THEN Noisy WHEN...
May 30, 2016 at 11:50 am
ChrisM@home (5/27/2016)
Sergiy (5/26/2016)
ChrisM@home (5/26/2016)
Using a clustered index like so:
CREATE CLUSTERED INDEX [cx_Stuff] ON [dbo].[ann_events_Tech_Details]
([source] ASC, [start_time] ASC)
Such clustered may be very good on query but it's gonna be a very...
May 29, 2016 at 10:18 pm
Sergiy (5/26/2016)
jc85 (5/26/2016)
Sergiy (5/25/2016)
SELECT dateadd(dd,0, datediff(dd,0,b.start_time)) as [date], b.source, b.lang, SUM(b.sel_test) Test, SUM(b.sel_test2) Test2
FROM TechDetails b
WHERE...
May 29, 2016 at 9:45 pm
Sergiy (5/25/2016)
SELECT dateadd(dd,0, datediff(dd,0,b.start_time)) as [date], b.source, b.lang, SUM(b.sel_test) Test, SUM(b.sel_test2) Test2
FROM TechDetails b
WHERE b.start_time >=...
May 26, 2016 at 4:15 am
Viewing 15 posts - 1 through 15 (of 31 total)