Viewing 15 posts - 61 through 75 (of 1,435 total)
DROP TABLE IF EXISTS #test;
CREATE TABLE #test ( ValueId varchar(30));
INSERT #test ( ValueId )
VALUES ( '1' )
, ( '99' )
...
November 2, 2023 at 10:26 am
BUT, that will only work if LEN(ValueID) <= 12
For longer strings, you will need to break ValueId into parts to match the GUID pattern
November 2, 2023 at 10:15 am
We create a separate schema. Permissions are provided to the schema.
Then for every object that needs to be exposed, we create a synonym under the exposed schema that maps to...
September 20, 2023 at 10:18 am
I have never used DDM.
But, a few observations
Image data type is deprecated, and should be replaced with varbinary(max)
Since the data in image and (var)binary fields is not human readable,...
September 7, 2023 at 7:00 am
If you insist on casting your key to a datetime, then you need to find the values that SQL is having difficulty converting.
Try this snippet to see what data it...
July 7, 2023 at 5:23 am
From the code, A and B are the same table. So, why are you making SQL jump through hoops when joining the column to itself. Simply join ON A.validon =...
July 7, 2023 at 5:22 am
Take a look at this article from Phil Factor
Testing the Performance of Individual SQL Statements within a Batch using SQL Prompt
It has sample extended events snippets for...
July 5, 2023 at 5:57 am
From the plan, it appears that you are returning 5.3mil rows.
Do you REALLY need that much data in the results?
July 4, 2023 at 10:52 am
However, doing a COUNT(*) so that we remove the time to push to display, seems to prefer the early filtering for CPU usage. Elapsed time still seems to prefer the...
June 26, 2023 at 6:29 am
Do we get any performance benefit by moving the TOP clause up into the Tally cte.
My gut says it is better to reduce the actual number of items as soon...
June 26, 2023 at 6:23 am
This post by Brent Ozar is a starting point
June 23, 2023 at 6:32 am
_TIMESTAMP is a datetime datatype, so SQL has no way to determine the timezone.
This is why you nee a double "AT TIME ZONE" to do the correct conversion.
There is no...
May 11, 2023 at 11:16 am
Msg 8144, Level 16, State 3, Line 37 Procedure or function string_split has too many arguments specified.
Completion time: 2023-05-08T15:45:39.2855074+05:30
What version of SQL are you using?
May 8, 2023 at 10:42 am
As stated in the other thread, download and install the following function in your DB
CREATE_FUNCTION_dbo_DelimitedSplit8K_LEAD.sql
Then use it as follows
WITH cteTwoWords AS (
SELECT TwoWords =...
May 4, 2023 at 10:36 am
This was the error message
Msg 208, Level 16, State 1, Line 14 Invalid object name 'dbo.DelimitedSplit8K'
Did you download and install dbo.DelimitedSplit8K on your SQL instance?
May 4, 2023 at 10:32 am
Viewing 15 posts - 61 through 75 (of 1,435 total)