Viewing 15 posts - 526 through 540 (of 1,193 total)
It's as the error message indicates.
SELECT failed because the following SET options have incorrect settings: 'ANSI_WARNINGS'.
Verify that SET options are correct for use with indexed views and/or indexes...
April 7, 2016 at 8:48 am
Brandie Tarvin (4/6/2016)
Folks, we have someone who is deliberately trying to force a deadlock to test some stuff. Can anyone give him advice on how he might do that?
Well, if...
April 6, 2016 at 11:47 am
The deadlock would be reproducible if you had all the queries run by the sessions involved in the deadlock.
The trick is that the execution stack and input buffer portions of...
April 6, 2016 at 11:10 am
The question itself even says from 2003, so... 🙂
April 6, 2016 at 10:07 am
Most likely the RangeS-U locks are on different ranges, with one coming from a previous statement in the transaction.
The fact that the non-Serializable transaction is trying to take a RangeI-N...
April 6, 2016 at 9:14 am
Missing your closing parenthesis for the COALESCE.
Cheers!
April 5, 2016 at 4:42 pm
I'd use COALESCE.
CREATE TABLE #temp (date1 date, date2 date, date3 date);
INSERT INTO #temp VALUES
('20150101', NULL,'20150203'),
(NULL,'20160401','20120303'),
(NULL,NULL,'20110101');
SELECT COALESCE(date1,date2,date3) FROM #temp;
First, is it possible for all 3 columns to have NULL values?...
April 5, 2016 at 4:16 pm
Nice job providing sample DDL and data!
Having said that, it doesn't look like the sample data matches your expected results. In your expected results there is an 'Equipment 6' that...
April 5, 2016 at 4:03 pm
In addition to Gail's fine points, the key difference between the two is that for one you materialize the result of the UNION query, which means that query only gets...
April 5, 2016 at 1:44 pm
If you don't want to use temporary objects and/or change how the values in the criteria are passed, then you'll need to split the string with the splitter of your...
April 5, 2016 at 11:21 am
sks_989 (4/5/2016)
DECLARE @clientid varchar(20)...
April 5, 2016 at 10:37 am
I think this is what you're looking for, but I had to make some assumptions:
SELECT loadORdelivery='D', --Not sure what the point of returning a constant 'D' here is?
...
April 1, 2016 at 1:26 pm
Resources labeled MD are for metadata. I've seen blocking around those before, but not with that INVALID (INVALID) description.
Exactly what code were you running that returned that description for the...
April 1, 2016 at 6:58 am
This seems to do what you want:
DECLARE @dt datetime;
SET @dt='20160331 14:38:25';
SELECT date_from=DATEADD(mi,(((DATEDIFF(mi,0,@dt)/30)-2)*30),0),
date_to= DATEADD(ss,-1,DATEADD(mi,(((DATEDIFF(mi,0,@dt)/30)-1)*30),0));
SET @dt='20160401 12:02:25';
SELECT date_from=DATEADD(mi,(((DATEDIFF(mi,0,@dt)/30)-2)*30),0),
...
April 1, 2016 at 6:51 am
In that case you could just use nested REPLACEs.
Alternatively, you could use CROSS APPLY to do the successive replace operations.
I like that way because it's a bit easier for me...
March 30, 2016 at 9:28 am
Viewing 15 posts - 526 through 540 (of 1,193 total)