Viewing 15 posts - 3,091 through 3,105 (of 8,761 total)
Quick suggestion
😎
USE TEEST;
GO
SET NOCOUNT ON;
DECLARE @input NVARCHAR(max) = '
hihihi
hihihi
hihihi
https://telegram.me/joinchat/BW0OCzvs1F6frTkUj2HEAQ
hihihi
hihihi
hihihi
https://telegram.me/joinchat/DigSjj6xZYsI_H2GRjtNQQ
hihihi
hihihi
hihihi
hihihi
http://telegram.me/ZOJ20/10236
';
;WITH T(N) AS (SELECT N FROM (VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) AS X(N))
, NUMS(N) AS (SELECT TOP(LEN(@input))
...
October 9, 2016 at 4:33 am
mister.magoo (10/8/2016)
Eirikur Eiriksson (10/8/2016)
For completeness, 5 different versions which all produce the same execution plan although performance may vary depending on the XML structure.😎
One more variant for these which shows...
October 9, 2016 at 3:59 am
Ouch ...biting the tongue....
😎
October 8, 2016 at 1:33 pm
The overlap problem can be solved in a much simpler manner, simply check if the current end is greater than the next start and if so use the next start...
October 8, 2016 at 2:58 am
wendy elizabeth (10/7/2016)
October 8, 2016 at 2:41 am
For completeness, 5 different versions which all produce the same execution plan although performance may vary depending on the XML structure.
😎
----------------------------------------------------------------------------
-- #1 Full traverse to the end node
----------------------------------------------------------------------------
SELECT Id...
October 8, 2016 at 2:37 am
You are very welcome.
😎
October 8, 2016 at 2:22 am
joshua 15769 (10/8/2016)
O! I found Host_process_ID to be my computer name! does it reflect all computer names that run a query from the system?
The value of the sys.dm_exec_sessions.host_process_id is defined...
October 8, 2016 at 12:49 am
Quick thought, no need to use the traversing operator "//" in the nodes path statement, it can be costly if the XML is complex.
😎
Non traversing examples
SELECT Id ,
...
October 8, 2016 at 12:29 am
joshua 15769 (10/7/2016)
October 7, 2016 at 11:56 pm
matt.warren 33350 (10/7/2016)
I have a table called "Tables" which stores a list of tables by id, name, etc.
I also have a table called "Columns" which stores a list of columns...
October 7, 2016 at 11:29 pm
itmasterw 60042 (10/7/2016)
I have a package that is using a Foreach File Enumerator loop to go through a folder and pull in the data from a 3 Excel files; insert...
October 7, 2016 at 11:13 pm
Grant Fritchey (10/7/2016)
Brandie Tarvin (10/7/2016)
Stuart Davies (10/7/2016)
rodjkidd (10/7/2016)
Brandie, and everyone else who are in the path / effected by Matthew, stay safeRodders...
I don't post here often, but love the community...
October 7, 2016 at 8:26 am
Quick suggestion
😎
USE TEEST;
GO
IF OBJECT_ID(N'dbo.temp') IS NOT NULL DROP TABLE dbo.temp;
create table dbo.temp(Companyid varchar(10) not null,companyname varchar(100) not null,DateFrom datetime not null, DateTo datetime null);
INSERT INTO temp values('A1','A Company','2000-04-11',null);
INSERT INTO...
October 7, 2016 at 8:07 am
October 6, 2016 at 4:37 am
Viewing 15 posts - 3,091 through 3,105 (of 8,761 total)