Viewing 15 posts - 7,321 through 7,335 (of 10,143 total)
Here's a Q&D alternative from a TSQL grunt:
SELECT
Value,
Item
FROM (
SELECT
Value,
Item,
[Instances] = COUNT(*) OVER (PARTITION BY Value, Item)
FROM #t1
) d
WHERE Instances = 1
I...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 23, 2010 at 7:10 am
Daniel Bowlin (9/23/2010)
un-freakin'-believable. I think this could go on forever. 😛
Un-freakin'-stoppable. It will!
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 23, 2010 at 6:57 am
wisdom.vivek (9/23/2010)
Better to use 'Text' DataType whenever we need to store large texts in our database.
Please explain why, in a SQL Server 2008 forum section?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 23, 2010 at 6:03 am
antonyp 46888 (9/23/2010)
Hi.The datatype for that column Nvarchar(Max)
Thanks
It's not at all clear what you are trying to do.
Are you attempting to insert a string into a Nvarchar(Max) column?
How are you...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 23, 2010 at 5:17 am
What is the data type of this column which is causing problems?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 23, 2010 at 5:11 am
Looks like Kingston's got the nail on the head here.
As a matter of interest, what is the aim of this operation?
The first action grabs everything in a string to the...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 23, 2010 at 4:32 am
Can you please post the view definitions:
vMBlockstoFinal1, vMBlockstoFinal2, vMBlockstoFinal3, vMBlockstoFinal4
Thanks
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 23, 2010 at 4:18 am
Two suggestions
Run this part on its own: (select clientid from table where ...)
Post the whole sproc.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 23, 2010 at 4:13 am
Ken@Work (9/22/2010)
As I said there will be many (100 plus) variables which some may or may not be used...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 22, 2010 at 8:01 am
Mike Menser (9/22/2010)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 22, 2010 at 7:46 am
Mike Menser (9/22/2010)
Can someone please explain the drawback of having a nested replace?
It can be awkward to get all those pesky commas and brackets in the right place? Small price...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 22, 2010 at 7:20 am
vevoda.ulath (9/22/2010)
Well, my intention is to write query for select data from #myTable using replacements from #replacements table, i.e. desired output is
XXXX something else YYYY
YYYY YYYY aaXXXX
Hope it's clear, thx...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 22, 2010 at 6:18 am
vevoda.ulath (9/22/2010)
Something looking pretty useful was posted on other forum:
CREATE TABLE X_REPLACEMENTS (
string NVARCHAR(100),
replacement NVARCHAR(100));
INSERT INTO X_REPLACEMENTS VALUES ('abc','123');
INSERT...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 22, 2010 at 4:50 am
Bob's made some excellent points there. In case you return to ask a few more questions - please do if you get stuck - here's a bit of code which...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 22, 2010 at 2:43 am
Alvin Ramard (9/21/2010)
Steve Jones - Editor (9/21/2010)
Keep up the bad jokes and we'll likely get 30 a day 🙂
A query walks into a bar, sees two tables and says: "May...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 22, 2010 at 2:19 am
Viewing 15 posts - 7,321 through 7,335 (of 10,143 total)