Viewing 15 posts - 616 through 630 (of 2,462 total)
J Livingston SQL (7/5/2016)
Hi Alan..have been following your recent scripts and am suitably impressed.
Thanks a lot J. That means a lot!
-- Itzik Ben-Gan 2001
July 5, 2016 at 6:47 pm
Here's a couple solutions based on what your output should look like for the values "MDL-9054-1" and "TX GMS-7000"
DECLARE @strings TABLE(string varchar(100));
INSERT @strings VALUES('MDL-9054-1'),('TX GMS-7000');
SELECT
ColA = SUBSTRING(string,1,CHARINDEX('-',string)-1),
...
-- Itzik Ben-Gan 2001
July 5, 2016 at 3:26 pm
Another approach would be to split the text into word-level bi-grams using NGrams8K[/url]. See the article for the function and a description of what a word-level bi-gram is.
Using...
-- Itzik Ben-Gan 2001
July 5, 2016 at 3:10 pm
thomashohner (7/5/2016)
... re-code the wheel.
Haha! +1
-- Itzik Ben-Gan 2001
July 5, 2016 at 9:36 am
SELECT
p.ProjectNo,
ProjectType = CASE WHEN p.ProjectType = 'new' AND x.ProjectType IS NOT NULL THEN 'new' ELSE '' END,
p.Location,
ChildDef = ISNULL(ChildDef,'')
FROM dbo.projects p
LEFT...
-- Itzik Ben-Gan 2001
July 1, 2016 at 1:13 pm
Or this:
SELECT *
FROM dbo.projects
WHERE Location IN
(
SELECT Location
FROM dbo.projects
WHERE ProjectType = 'new'
)
-- Itzik Ben-Gan 2001
July 1, 2016 at 12:54 pm
DiabloSlayer (6/26/2016)
Hi Alan Burstein,...Secondly, can you point me where I can learn the contents in your script so I can decipher it and learn it for the future?
Ok, my final...
-- Itzik Ben-Gan 2001
July 1, 2016 at 9:32 am
Sergiy (6/30/2016)
That's a big bunch of code!
Compare to this (using the table I've posted above):
DECLARE @StartDate SMALLDATETIME, @EndDate DATE, @WeekStartsFrom VARCHAR(50)
SET @StartDate = '20160501'
SET @ENDDATE = '20160531'
SET @WeekStartsFrom =...
-- Itzik Ben-Gan 2001
July 1, 2016 at 8:58 am
DiabloSlayer (6/30/2016)
Thank you for the update and help !!
So I ran the update script for the period of 05/01/2016 to 05/31/2016 and I'm not sure why I'm getting two...
-- Itzik Ben-Gan 2001
June 30, 2016 at 1:51 pm
TheSQLGuru (6/30/2016)
Alan.B (6/30/2016)
-- Itzik Ben-Gan 2001
June 30, 2016 at 12:34 pm
Kevin said a lot of what I was going to say especially about fixing that sort with the tempdb spill - that's going to kill you. An index on [WOEC].[WOE].[ORDER_ITEM].ORDER_ITEM_UID,...
-- Itzik Ben-Gan 2001
June 30, 2016 at 12:11 pm
DiabloSlayer (6/26/2016)
I ended up using your solution so thank you VERY MUCH 🙂
I just have two questions for you, first, how can I change the start date to...
-- Itzik Ben-Gan 2001
June 30, 2016 at 8:50 am
Luis Cazares (6/29/2016)
oradbguru (6/29/2016)
WHERE ' ' = ' '
Any ideas what...
-- Itzik Ben-Gan 2001
June 29, 2016 at 2:08 pm
Forgive me if I'm wrong (it's been many years since I was a DBA) but I believe they would also need at least public access to the msdb database.
-- Itzik Ben-Gan 2001
June 29, 2016 at 2:03 pm
Solomon Rutzky (6/26/2016)
-- Itzik Ben-Gan 2001
June 28, 2016 at 12:50 pm
Viewing 15 posts - 616 through 630 (of 2,462 total)