Viewing 15 posts - 5,911 through 5,925 (of 59,101 total)
I was too enthousiastic. What I did was I only took the 7 character long records (WHERE LEN(column1)=7) and then applied the LEFT functions as indicatde above....
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 11:03 pm
ScottPletcher wrote:This has less overhead...
Just curious, Scott... how are you measuring "overhead" for this?
Actually, for this one, I just looked at the query plans. The other code is...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 10:54 pm
Are you terminating the preceding statement with a semicolon?
You can start statements that begin with "WITH" with a semicolon:
;WITH ret AS(
Now, there's an interview...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 10:45 pm
You have some values that have leading zeros. Must the leading zeros be preserved? If so, then not all of the columns are actually INTs as you said. Let me...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 10:31 pm
I am using SQL Server 2008 R2 version. Is there any method to store decimal value in SQL without extra trailing zeros(like Float data type format). I have created...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 10:12 pm
I was too enthousiastic. What I did was I only took the 7 character long records (WHERE LEN(column1)=7) and then applied the LEFT functions as indicatde above. But, apparently,...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 10:09 pm
@ Jeff Moden,
It concerns the hierchy as described in https://en.wikipedia.org/wiki/Anatomical_Therapeutic_Chemical_Classification_System
Now, this said, what I want to achieve is to have a Dimension which contains all hierarchies, and a...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 10:07 pm
I guess I'm an odd ol' duck. I don't need or even want F2F interaction with humans unless it's on a pool table in my favorite bar and that's not...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 9:53 pm
This has less overhead...
Just curious, Scott... how are you measuring "overhead" for this?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 4:45 pm
SELECT * FROM [Staging].[3NF_ATCCOLLECTION] ATC WHERE ATC.[ATC_KEY] LIKE '[a-z]' OR ATC.[ATC_KEY] LIKE '[a-z][0-9][0-9]' OR ATC.[ATC_KEY] LIKE '[a-z][0-9][0-9][a-z]' OR ATC.[ATC_KEY] LIKE '[a-z][0-9][0-9][a-z][a-z]' OR ATC.[ATC_KEY] LIKE '[a-z][0-9][0-9][a-z][a-z][0-9][0-9]' ORDER BY ATC.[ATC_KEY]
This results...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 14, 2020 at 3:56 am
abridged version of what I need
I'd recommend sharing what the unabridged version is because it will be in even more of a need of speed and a While loop...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 13, 2020 at 5:39 am
The standard pattern uses 0 as the base, not 1 or -1 or some other "cute" trick.
No sir... There are a couple of "standards". The...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 13, 2020 at 5:01 am
Hi, I need to build a hierachy multi-column table based on data in 1 column where the length of the string determines in which column the string must be...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 13, 2020 at 4:56 am
Ahoi,
i have a set of 7 int columns in a table.
My goal is im trying to create a unique key/integer for each possible combination of these 7 by merging...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 13, 2020 at 4:51 am
ORDER BY is never needed, in the sense that it's irrelevant to whether SQL uses minimal logging or not. Therefore, the code doesn't need it for "safety". And it's...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 12, 2020 at 9:29 pm
Viewing 15 posts - 5,911 through 5,925 (of 59,101 total)