Viewing 15 posts - 1,111 through 1,125 (of 59,064 total)
@Grasshopper's solution does not work for negative numbers, so here's his version that does work for negative numbers:
create function dbo.RoundToEven(@num numeric(38,19)) returns decimal(19,2)
begin
return case
...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 16, 2023 at 2:46 am
Good Lord! I've got more testing to do but I ran a simple "Tally CTE Function" test in 2017 and 2022 on my laptop. The results...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 9:10 pm
Thanks for the post about SQL 2022, Jeff. I've reached out to my team and mentioned that we need to fix all the problems we're currently having with SQL...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 9:06 pm
Hey Jeff,
I was talking to Bob Ward about your tests. He was interested in an introduction to talk about them. Any interest? If so, which email should I use?
Yes. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 8:57 pm
The only difference I see between that code and mine is CONVERT rather than CAST ... I didn't realize CAST had that "big overhead". (Presumably using LEFT rather than...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 4:38 pm
IF the MMDDYYYY formatted string date is guaranteed to always be 8 characters, the following works (most of the posted code doesn't consider the inclusion of the ".txt") according to...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 4:38 am
Deleted. Made a mistake and didn't check before I posted. 🙁
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 2:03 am
Here's a quick question for you because we have to enforce such things where I work... do you want the conversion to fail if the date contains less than 8...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 1:59 am
From the article:
A few of them are in this post, though he's written a book with 450 pieces of advice.
My first thought when I read that was when they replaced...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 1:24 am
All,
I'm new to Powershell so this could be a simple error.
I'm using a SQL agent job to backup a database to a UNC path and then rename it.
The...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 1:13 am
I see a lot of focus here on not reindexing at all - mostly because no one can prove that reindexing improves performance. I am not sure how that...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2023 at 1:05 am
I have to second Michael's recommendation yet again. Stop doing index maintenance on your RowStore indexes until you can prove some significant performance benefit. Use the time to do Statistics...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 13, 2023 at 11:13 pm
Good Lord! I've got more testing to do but I ran a simple "Tally CTE Function" test in 2017 and 2022 on my laptop. The results are REALLY...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 13, 2023 at 5:46 pm
Since you're not using SQL Server (based on the INT4 datatypes you used), it may be that the RDBMS you're using doesn't allow CTEs (Common Table Expressions),...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 13, 2023 at 2:00 pm
The intention was to know the reason do we need to bother about fragmentation for tables with 10's or few 100's of pages. I see dev team...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 12, 2023 at 8:18 pm
Viewing 15 posts - 1,111 through 1,125 (of 59,064 total)