Viewing 15 posts - 1 through 15 (of 2,648 total)
AWS isn't cheap. We should all be spending more on it. After all, Jeff Bezos has a rocket to fund, and apparently getting to space isn't cheap either. ??
August 22, 2026 at 12:58 am
Just wrap the whole thing in a NOT:
WHERE NOT (
[BillingReason] IN (1, 2, 3)
AND [NewInsID] IS NOT NULL
...
August 22, 2026 at 12:55 am
Assuming the stored procedures contain no dynamic SQL, you shouldn't need EXECUTE AS for this at all.
If RO and dbo are both owned by dbo, SQL Server's ownership chaining allows...
August 22, 2026 at 12:48 am
In July 2023, I bought a 2.5-inch Samsung 870 EVO 4TB SSD for £150. The actual price was £199, but I received £50 cashback from Samsung, bringing the effective cost...
August 20, 2026 at 12:02 pm
naumon765 wrote:
Hi Jeff, Thanks for taking the time to share your thoughts. I wanted to mention that I do not like the formatting of sqlservercental.com...
June 28, 2026 at 2:10 am
Does the table have any clustered index, e.g a clustered primary key?
December 28, 2025 at 3:53 am
As Scott points out moving the ON condition of a left join to the WHERE will make it an inner join.
But it is a good idea to try rewriting the...
April 30, 2025 at 2:31 pm
I have a list of transactions in a table. Each transaction has a unique id which is a Guid, a date, a product that was ordered and an amount....
April 15, 2025 at 12:30 am
I have a list of transactions in a table. Each transaction has a unique id which is a Guid, a date, a product that was ordered and an amount....
April 15, 2025 at 12:30 am
You can export the data as text files as long as you re-import the files to check it goes smoothly. People often find commas in csv fields or...
April 10, 2025 at 5:50 pm
How could I incorporate this into a report?
Can I add this to the bottom of the query?
IF OBJECT_ID('tempdb..#source_table', 'U') IS NOT NULL DROP TABLE #source_table;
IF OBJECT_ID('tempdb..##new_table', 'U') IS NOT...
April 9, 2025 at 2:47 pm
if a global temp table works, that would be fantastic. When, how does a global temp table get dropped.
P.S. I'm thinking of putting this code into a report, which...
April 9, 2025 at 2:46 pm
This works using a global temporary table:
IF OBJECT_ID('tempdb..#source_table', 'U') IS NOT NULL DROP TABLE #source_table;
IF OBJECT_ID('tempdb..##new_table', 'U') IS NOT NULL DROP TABLE ##new_table;
DECLARE @sql NVARCHAR(MAX);
DECLARE @cols NVARCHAR(MAX);
DECLARE @insert_sql... April 9, 2025 at 2:16 pm
Error - Windowed functions cannot be used in the context of another windowed function or aggregate.
SELECT ROW_NUMBER() OVER (PARTITION BY Account ORDER BY A."Account") AS "RowNo", A."Account" AS "Account", (A."Debit")...
March 26, 2025 at 12:42 pm
RIGHT_SHIFT and LEFT_SHIFT are CPU instructions implemented in hardware using barrel shifters, making them extremely fast, significantly faster than multiplying or dividing by 2 raised to an integer power. However,...
March 19, 2025 at 4:47 pm
Viewing 15 posts - 1 through 15 (of 2,648 total)