Viewing 15 posts - 1,396 through 1,410 (of 6,036 total)
I must have forgotten to fix the text after copy-paste.
Should be
inserted row in the OrderDetailsHistory is not "V" -
June 6, 2016 at 8:22 pm
sqlnewbie17 (5/26/2016)
The above code is part of an SSRS report.After setting variables properly it is still not filtering data based of the date column.
The above query cannot be a part...
June 2, 2016 at 6:06 pm
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 after?
June 1, 2016 at 9:56 pm
SQLCurious (6/1/2016)
DECLARE @UnparsedString VARCHAR(MAX) = 'This|is|a|short&Sweet|sentence')
I get the following error...
Msg 9411, Level 16, State...
June 1, 2016 at 6:57 pm
Did you check sp_configure 'user connections'?
June 1, 2016 at 4:39 pm
jc85 (6/1/2016)
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...
June 1, 2016 at 4:01 am
It goes like this:
Declare @StartDate datetime, @EndDate datetime
Set @StartDate = --beginning of the month
Dateadd(mm, datediff(mm,0, @Date), 0)
SET @EndDate = -- end of the month
...
May 31, 2016 at 10:53 pm
You may take the performance optimisation to the extreme, minimising the number of checks required for "ordinary" logons:
BEGIN
IF ORIGINAL_LOGIN() = '<the restricted user>'
-- if it's not...
May 31, 2016 at 6:37 pm
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 but...
May 31, 2016 at 2:40 pm
Jeff Moden (5/30/2016)
https://msdn.microsoft.com/en-us/library/ms188365(v=sql.105).aspx
You can, however, pre-convert the file to UTF-16 to import. Supposedly, the code at...
May 30, 2016 at 10:16 pm
SQL Server does not understand UTF-8.
Convert the file to UCS-2 and then BULK INSERT will load it correcty.
May 30, 2016 at 9:05 pm
yb751 (5/30/2016)
I've been using this report technique for years. Mind you, I have heavily modified it for my own purposes but it's a fantastic place to start.http://www.wisesoft.co.uk/articles/dba_daily_checks_email_report.aspx
In the article...
May 30, 2016 at 7:30 pm
Glad it helped.
Thanks for the feedback.
I'd recommend a clustered index on ann_ReportItem like this:
CREATE NONCLUSTERED INDEX [ix_RItem] ON [dbo].[ann_ReportItem]
(
[report_id] ASC,
[call_flow_name] ASC,
[source] ASC
May 30, 2016 at 5:22 pm
jc85 (5/29/2016)
However it did not return correct output, can you advise which part of the query need...
May 30, 2016 at 1:54 am
jc85 (5/29/2016)
Which column should I put as index for table ann_ReportItem?
Clustered index must be set up on column(s) used for range selection.
Always.
You select by the range of dates.
So, your clustered...
May 30, 2016 at 1:42 am
Viewing 15 posts - 1,396 through 1,410 (of 6,036 total)