Viewing 15 posts - 466 through 480 (of 7,608 total)
I've seen issues repeatedly with "SELECT ... INTO <new_table>" causing blocking (on SQL 2016). When we adjust the code to split the table creation...
April 2, 2023 at 3:45 am
/* dummy post to allow me to see my previous post */
April 1, 2023 at 9:49 pm
I've seen issues repeatedly with "SELECT ... INTO <new_table>" causing blocking (on SQL 2016). When we adjust the code to split the table creation and the...
April 1, 2023 at 9:10 pm
I've seen issues repeatedly with "SELECT ... INTO <new_table>" causing blocking (on SQL 2016). When we adjust the code to split the table creation and the table load...
April 1, 2023 at 8:41 pm
I've seen issues repeatedly with "SELECT ... INTO <new_table>" causing blocking (on SQL 2016). When we adjust the code to split the table creation and the table load...
April 1, 2023 at 8:35 pm
Derrick Smith (9/15/2010)
Jeff Moden (9/14/2010)
Derrick Smith (9/14/2010)
April 1, 2023 at 8:29 pm
I've seen issues repeatedly with "SELECT ... INTO <new_table>" causing blocking (on SQL 2016). When we adjust the code to split the table creation and the table load the problems...
April 1, 2023 at 7:48 pm
ScottPletcher that is not entirely true and that is not what I was talking to. I was looking at the bigger picture or the why are they creating these...
April 1, 2023 at 7:45 pm
You don't really need to partition the table if you (1) cluster the table by date first and (2) the lookup queries specify a WHERE clause on a date or...
March 31, 2023 at 9:50 pm
(1) You could use dynamic SQL and change the table name literally in the code before executing it.
(2) Or you could instead use a synonym to point to the active...
March 31, 2023 at 1:35 pm
SELECT
CAST(Time_2 AS date) AS Date,
CAST(SUM(CASE WHEN DATEPART(HOUR, Time_2) = 1 THEN Unit ELSE 0 END) AS decimal(9, 3))...
March 31, 2023 at 2:50 am
Since you're only doing INSERT and not UPDATE, you don't need MERGE.
I really can't follow the different tables you have since there's only one source table for all the columns...
March 30, 2023 at 7:16 pm
You'll need to CAST any text column(s) to varchar(max) in the PARTITION BY.
March 30, 2023 at 3:13 pm
;WITH cte_count_dups AS (
SELECT
*, COUNT(*) OVER(PARTITION BY Nationalnumber, Birthdate, Mobilphone, Emailaddress, Firstname) AS dup_count
...
March 30, 2023 at 3:07 pm
Not a lot of details. Maybe something like this:
SELECT
NationalNumber
FROM Contact
GROUP BY NationalNumber
HAVING /*COUNT(*) > 1 AND*/
((COUNT(DISTINCT Birthdate) >...
March 30, 2023 at 12:50 pm
Viewing 15 posts - 466 through 480 (of 7,608 total)