Viewing 15 posts - 61 through 75 (of 747 total)
Don't reuse the same temp table for different sets of columns. It makes debugging confusing, and it subverts the way SQL Server manages temp tables.
One of the small optimizations SQL...
April 2, 2024 at 1:14 pm
March 27, 2024 at 1:09 pm
You mention "app team" a few times. Does this mean only developers, or does app team also include product owners? The question of data retention is a business concern in...
March 19, 2024 at 2:31 pm
"I tried to create a stored procedure on a database that would execute as owner (blindly believing it to be 'sa'). The create failed because the owner didn't exist, so...
March 15, 2024 at 7:01 pm
For some reason, you didn't ask -- perhaps deliberately -- about the simplest and probably the best option, which is just:
SELECT field1,field2
FROM table1
Because there is no where...
March 14, 2024 at 9:38 pm
Duplicate created when original appeared to time out.
Deleted.
March 14, 2024 at 7:35 pm
Are both servers running the same SQL Server version?
Are both databases using the same compatibility level?
Are both databases using the same transaction isolation level?
Are both databases/tables using the same collation?
Do...
March 14, 2024 at 7:32 pm
And if you truly don't care about the date entered when Type is not "Apple", you can simplify Emperor100's example to
ALTER TABLE [Testing]
ADD CONSTRAINT CHK_Dates CHECK
(
...
March 14, 2024 at 1:13 pm
Does your table already have a clustered index on the column you will use for partitioning? If not, it will need to. That presents the likelihood of downtime & locking...
March 7, 2024 at 5:28 pm
March 7, 2024 at 2:13 pm
You could use sums of case statements to get the count:
WITH subquery as
(
SELECT
'A' AS SYMBOL, CAST(GETDATE() AS DATE) AS TRADE_DATE,
0 AS AB30_C, 1 AS AB30_P, 1 AS...
March 5, 2024 at 9:27 pm
SSMSBoost appears to be back from the dead.
March 5, 2024 at 2:23 pm
I haven't begun to use all of SQL Prompt's features. But it's code completion is much better than SSMS built-in intellisense. I have found Smart Rename & Find Invalid Objects...
March 5, 2024 at 2:14 pm
March 4, 2024 at 2:43 pm
How many rows are you keeping?
It may be faster & easier to insert retained rows into a new table, rename or drop the old table, and rename the new table...
February 29, 2024 at 2:02 pm
Viewing 15 posts - 61 through 75 (of 747 total)