Viewing 15 posts - 361 through 375 (of 444 total)
So try
SELECT DISTINCT
t1.id,
t1.empid,
t1.jobnum,
t1.opcode,
t1.starttime,
t1.finishtime,
t2.id id2,
t2.empid empid2,
t2.jobnum jobnum2,
t2.opcode opcode2,
t2.starttime starttime2,
t2.finishtime finishtime2
FROM
vGSL_DMTEpicorData t1 inner join
vGSL_DMTEpicorData t2
on t1.jobnum=t2.jobnum and
t1.empid=t2.empid and
(
t1.starttime < t2.finishtime and
t2.starttime <...
October 30, 2014 at 7:15 am
🙂
Alternatively use OPENXML
DECLARE @xmlDocument nvarchar(max)
SET @xmlDocument = N'<table>
<tr>
<td>cell1</td>
<td>cell2</td>
<td>cell3</td>
</tr>
<tr>
...
October 30, 2014 at 7:06 am
Symmetric condition , i mean for two intervals, just dates for example, (2014-10-30, 2104-11-02) and (2014-10-29, 2014-11-03) no matter which is t1 and which is t2 symmetric intersection condition...
October 30, 2014 at 7:05 am
Yep, overlapping condition ... Generaly, overlapping means
t1.starttime < t2.finishtime AND t2.starttime < t1.finishtime
i.e those intervals have at least one common point. And this condition is symmetric.
Sorry, haven't...
October 30, 2014 at 5:47 am
Provided Id is unique just add
AND t1.ID < t2.ID
to ON clause.
October 30, 2014 at 5:02 am
Nice question.
raulggonzalez (10/29/2014)
The reason why uses DATALENGTH is because the column is DEFINED as NVARCHAR()
Really, it doesn't matter because SQL Server stores XML data in Unicode (UTF-16)...
October 30, 2014 at 2:21 am
Hugo Kornelis (10/28/2014)
One NULL is correct for a single-column constraint, not for composite. A better way to phrase it is that a UNIQUE constraint allows NULLs (as per ANSI standard),...
October 29, 2014 at 1:56 am
Koen Verbeeck (10/28/2014)
serg-52 (10/28/2014)
"only one null " is someway misleading. Precisley it's a "only one null value per column".If the unique index is not a filtered index 😉
It's another point...
October 28, 2014 at 2:30 am
"only one null " is someway misleading. Precisley it's a "only one null value per column".
October 28, 2014 at 1:25 am
Looks like it's "5. etc....", numbers packed by some app somehow and only those app developer can tell you which way a BLOB should be decoded.
October 22, 2014 at 12:40 am
Kind of
declare @groups table (
id int,
gname varchar(10)
);
insert @groups values
(1,'Dividend')
,(2,'Dividend')
,(3,'Dividend')
,(4,'Divisor')
,(5,'Divisor')
,(6,'Divisor')
,(7,'Divisor')
;
select [Period], sum(case gname when 'Dividend' then [Score] end) / sum(case...
October 20, 2014 at 4:19 am
May be home made email index will have better perfomance.
Use regexp using CLR or sp_OACreate 'VBScript.RegExp' to build a
#mailIndex (OriginalRowId, Pos, Mail). Build index and join with the...
October 20, 2014 at 3:34 am
You may want to create SQLCLR TVF proc returnig file list with poperties see sample code http://www.sqlservercentral.com/articles/SQLCLR/65656/
October 17, 2014 at 6:07 am
Full text is just the option designed for what you are looking for http://technet.microsoft.com/en-us/library/ms142571(v=sql.105).aspx
October 17, 2014 at 4:34 am
Quite possible a business rule exists, allowing users query DB with no filters set. And there're users and users. So it's a management problem really. Teach users or buy...
October 17, 2014 at 2:58 am
Viewing 15 posts - 361 through 375 (of 444 total)