Viewing 15 posts - 451 through 465 (of 7,597 total)
Just to be safe, I would CAST the text to varchar(max). And, also, add code in case '</Node1>' is missing:
select
table1.Id,
substring(
ca1.source_data_varchar,
charindex('<Node1>',ca1.source_data_varchar) + 7,
nullif(charindex('</Node1>',ca1.source_data_varchar), 0) -...
April 5, 2023 at 2:17 pm
I put a space after the embedded forename (because of the wording of the OP: "who put in their middle name or surname with forenames separated by a space".)
Otherwise, I...
April 3, 2023 at 7:57 pm
You might avoid some false matches by using:
like '%' + p.forenames + ' %'
April 3, 2023 at 5:46 pm
But you should add the NULLability setting to the column. The default is somewhat obscure so you should always specify NULL or NOT NULL when adding a column.
April 3, 2023 at 2:17 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...
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
Viewing 15 posts - 451 through 465 (of 7,597 total)