Viewing 15 posts - 3,331 through 3,345 (of 59,098 total)
This link gives a few reasons for choosing shorter varchar lengths.
In terms of storage, CHAR(n) columns are always n characters long.
VARCHAR(n) columns are anything between 2 and...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 2:12 pm
Remember, too, that the logical data model should be easily understood and use by business people. In fact, if possible, keep all developers out of the first one or...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 2:09 pm
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 1:47 pm
I took a look at your spreadsheet and immediately found a pretty nasty issue... about 2/3rds of the rows have duplicated Ticket Numbers.
As for being new to the game, you...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 19, 2022 at 1:08 am
No joy on the "new" formula. It has about the same performance for the DATETIME datatype and is 50% slower for the DATE datatype. It's also not "symmetrical" with how...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 11:22 pm
I'm also exploring a different method using the following formula for finding the week start, midweek, and end dates (the 1 needs to be changed to a 4 and 7...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 10:43 pm
Here's another example where it appears to be a well supported "Holy Grail" article. But, it produces "week start dates" that are greater than the original date. That's means it's...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 9:59 pm
Microsoft SQL Server 2016 service packs are cumulative updates and upgrade all editions and service levels of SQL Server 2016 SP1 to SP2. This service pack contains up to...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 9:21 pm
Thanks for the information that you share with us. I will try to figure it out for more.
Hi and welcome aboard.
Be advised that your post looks and smells like...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 9:17 pm
I think that the easiest way would be to add a column to table A with an "OffsetDate" column built in. That will also me nicely indexable and easy to...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 9:15 pm
Hello friends, I am a casual learner and right now exploring the DBA field (I am a database developer). Now I recently had a discussion with my group of...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 9:05 pm
multiple bulkier tables with years of data
https://www.sqlshack.com/database-table-partitioning-sql-server/
https://www.brentozar.com/archive/2012/08/potential-problems-partitioning/
Partitioning is not a method of increasing performance of code. In fact, it usually slows code down, sometimes by a far amount.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 8:24 pm
A newbie here. I have these columns, here are the samples and the data types I've chosen:

I'd just like to ask if the choices I've made...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 8:21 pm
It can't be deleted. No worries there, though. It can actually help others if they end up with a similar question.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2022 at 7:56 pm
It looks like you want the results from the first table when they don't match. For this specific case I would use EXCEPT instead of joining and comparing:
--Jeff Moden
RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.Change is inevitable... Change for the better is not.
Helpful Links:
How to post code problems
How to Post Performance Problems
Create a Tally Function (fnTally)
June 18, 2022 at 7:49 pm
Viewing 15 posts - 3,331 through 3,345 (of 59,098 total)