Viewing 15 posts - 1,201 through 1,215 (of 2,462 total)
This seems pretty simple but it would be helpful if you could include some sample data and the expected results. If you do that I'm confident that you'll get a...
-- Itzik Ben-Gan 2001
October 23, 2015 at 10:04 am
anthony.green (10/19/2015)
Jeff Moden (10/18/2015)
Any "hybrid" DBAs that...
-- Itzik Ben-Gan 2001
October 22, 2015 at 4:32 pm
Andrew P (10/22/2015)
Luis Cazares (10/22/2015)
Andrew P (10/22/2015)
RE: the answers in this threadYou guys are joking, right? right guys? :blink:
Now I'm not sure if I read the question correctly 😀
Ahhh, I...
-- Itzik Ben-Gan 2001
October 22, 2015 at 4:23 pm
I don't know how much that's happening Steve. I just read the article that you linked to and the update reads,
"the Silver detention may be linked to an ongoing...
-- Itzik Ben-Gan 2001
October 22, 2015 at 4:08 pm
Scott did my first solution (that one only scans the table once)...
Here's another way:
SELECT UniqID
FROM #SampleData
WHERE Code = 'ABC'
EXCEPT
SELECT UniqID
FROM #SampleData
WHERE Code <> 'ABC'
-- Itzik Ben-Gan 2001
October 22, 2015 at 3:36 pm
ignacio.jose (10/22/2015)
Just finished reading http://www.sqlservercentral.com/articles/Tally+Table/72993/Impresive
That article certainly helped me a great deal.
-- Itzik Ben-Gan 2001
October 22, 2015 at 7:55 am
ignacio.jose (10/21/2015)
Then you will have to...
-- Itzik Ben-Gan 2001
October 21, 2015 at 9:57 pm
First welcome to SSC.
My solution uses a hacked version of Jeff Moden's DelimitedSplit8K (the splitter mentioned in my signature). If you have not worked with a splitter before I...
-- Itzik Ben-Gan 2001
October 21, 2015 at 9:54 pm
Using the splitter in my signature line you could do this:
-- let's create some easily consumable DDL
DECLARE @YourTable TABLE (RowNumber int primary key, Comments varchar(1000) NOT NULL);
-- Insert sample values
INSERT...
-- Itzik Ben-Gan 2001
October 21, 2015 at 9:05 pm
mr.addikhan (10/20/2015)
Alan.B (10/20/2015)
mr.addikhan (10/20/2015)
its not working 🙁 my tbl name is tblemp column name is empaddress
I would suggest taking what I posted (or what Luis posted if order...
-- Itzik Ben-Gan 2001
October 20, 2015 at 2:30 pm
mr.addikhan (10/20/2015)
its not working 🙁 my tbl name is tblemp column name is empaddress
I would suggest taking what I posted (or what Luis posted if order is important)...
-- Itzik Ben-Gan 2001
October 20, 2015 at 2:19 pm
Luis Cazares (10/20/2015)
CREATE FUNCTION dbo.RemoveDupes(@string varchar(8000))
RETURNS TABLE AS
RETURN
WITH CTE AS(
SELECT...
-- Itzik Ben-Gan 2001
October 20, 2015 at 2:17 pm
using the splitter referenced in my signature line, you could create this function:
CREATE FUNCTION dbo.RemoveDupes(@string varchar(8000))
RETURNS TABLE AS RETURN
SELECT NewString =
(
SELECT DISTINCT item+' '
FROM DelimitedSplit8K(@string,' ')
FOR XML PATH(''),...
-- Itzik Ben-Gan 2001
October 20, 2015 at 2:00 pm
Using Eirkur's sample data and the aforementioned splitter, you could do this:
UPDATE dbo.TBL_SAMPLE_PARSE
SET MyString = REPLACE(REPLACE(MyString,',',' '),'.',' ')
SELECT DISTINCT Item
FROM TBL_SAMPLE_PARSE
CROSS APPLY dbo.delimitedSplit8K(MyString, ' ')
WHERE item LIKE '%[##%##]%' ESCAPE '[';
Edit:...
-- Itzik Ben-Gan 2001
October 20, 2015 at 1:48 pm
Sean Lange (10/15/2015)
nguyenanhminhxd (10/15/2015)
-- Itzik Ben-Gan 2001
October 15, 2015 at 2:54 pm
Viewing 15 posts - 1,201 through 1,215 (of 2,462 total)