Viewing 15 posts - 3,541 through 3,555 (of 8,754 total)
Elementary when using the DelimitedSplit8K function
😎
USE TEEST;
GO
DECLARE @testdata TABLE
(
IDINT NOT NULL,
DegreeStr VARCHAR(100),
YearEarnedStrVARCHAR(100)
);
INSERT INTO @testdata
SELECT 1, 'BS,MS,PhD', '2001,2005,2011' UNION ALL
SELECT 2, 'BS', '2003' UNION ALL
SELECT 3, 'BS,MS', '2002,2008'
SELECT
...
June 1, 2016 at 7:15 am
Ed Wagner (6/1/2016)
June 1, 2016 at 5:30 am
No applicable answer listed as the code is perfectly valid (maybe not valid on SQL Server 2000 but cannot be bothered to check).
😎
June 1, 2016 at 5:24 am
ChrisM@Work (5/31/2016)
May 31, 2016 at 7:50 pm
mark.kremers.prive (5/30/2016)
Eirikur Eiriksson (5/30/2016)
Quick question, what value are you passing with the [-a packetsize] parameter? IIRC, if none is passed it will revert to the default 4096k😎
tried 64k, 32k and...
May 30, 2016 at 10:49 pm
yb751 (5/30/2016)
Eirikur Eiriksson (5/30/2016)
tmmutsetse (5/30/2016)
SELECT
Name,
Memory,
Model
FROM [xxxx].[dbo].[Status]
where
active =...
May 30, 2016 at 9:45 am
tmmutsetse (5/30/2016)
SELECT
Name,
Memory,
Model
FROM [xxxx].[dbo].[Status]
where
active = 1 and
and name...
May 30, 2016 at 9:32 am
tmmutsetse (5/30/2016)
Thanks Tom,Infact i have more than those names mentioned above.Almost 30 names.
Try to write down the definition of the logic, otherwise it will be impossible to construct a query...
May 30, 2016 at 4:52 am
Quick question, what value are you passing with the [-a packetsize] parameter? IIRC, if none is passed it will revert to the default 4096k
😎
May 30, 2016 at 4:29 am
Pre-grouping works quite well in this case, especially if there is a filtered index on the the table for customerID where sales is not null.
😎
;WITH CUSTOMERS_SALE AS
(
...
May 28, 2016 at 10:28 am
TheSQLGuru (5/28/2016)
Eirikur Eiriksson (5/28/2016)
santiagoc93 (5/27/2016)
select customerId, window, product, sales,( Case when count(sales) over(partition by customerid order by customerid) >0 then 1 else 0 end)as class
from #example
Very nice!
😎
The...
May 28, 2016 at 9:39 am
santiagoc93 (5/27/2016)
select customerId, window, product, sales,( Case when count(sales) over(partition by customerid order by customerid) >0 then 1 else 0 end)as class
from #example
Very nice!
😎
The addition of the...
May 28, 2016 at 3:23 am
This can be done more efficiently with a simple ROW_NUMBER implementation.
😎
The problem with your solution is that it scans the table 1+(2 x number of rows) times, fear it will...
May 28, 2016 at 2:05 am
Alternative method using Lynn's fine test set (with the addition of a Beginninator 😀 )
😎
;WITH testdata AS (
SELECT
Directory
FROM
(VALUES
('/dev/Mywork/deailsbyWork'),
('/dev/MyTeam/deailsbyTeam'),
('/dev/MySubgroup/deailsbySubgroup'))dt(Directory)
)
,FIRST_CHOP AS
(
SELECT
...
May 26, 2016 at 4:53 pm
Piling on, don't use implicit convertion
😎
DECLARE @startdate DATETIME = CONVERT(DATETIME,'20160101',112);
May 26, 2016 at 4:33 pm
Viewing 15 posts - 3,541 through 3,555 (of 8,754 total)