Viewing 15 posts - 166 through 180 (of 1,468 total)
@jeff Moden
I have a fiber outage at the moment, so was unable to catch your Group By session on GUIDS V.S. FRAGMENTATION last night.
Is there perhaps a recording of your...
May 25, 2022 at 5:39 am
The queries would look something like this
SELECT TOP ( 10 )
...
May 24, 2022 at 12:02 pm
Try taking a look at theses 2 management views. Change the ORDER BY in your queries to get highest use per I/O, CPU, Memry sys.dm_exec_query_stats
May 24, 2022 at 11:12 am
Try taking a look at theses 2 management views. Change the ORDER BY in your queries to get highest use per I/O, CPU, Memry
May 23, 2022 at 11:39 am
You cannot index all those nvarchar fields. So the sql engine has to do a full table scan to look for the matches.
May 17, 2022 at 6:34 am
Based on your terrible table designs, I cant think of anything that will help you.
Things that immediately stand out as what will hurt
May 17, 2022 at 6:20 am
If you convert your @DB_Users table variable to a temp table, the following code will dynamically create the cross-tab in SQL
DECLARE @Query nvarchar(MAX);
SET @Query = 'WITH cteData...
May 11, 2022 at 9:09 am
You can take a look at the following articles by Jeff Moden on dynamically creating PIVOTs and CROSS_TABs
https://www.sqlservercentral.com/articles/cross-tabs-and-pivots-part-2-dynamic-cross-tabs
May 11, 2022 at 8:38 am
The following query will satisfy your requirements
WITH cteData AS (
SELECT t.*
, rn = ROW_NUMBER() OVER (...
May 6, 2022 at 7:49 am
This should give you the same result as your complicated calculation
SELECT @naam = 'I' + CONVERT(char(4), GETDATE(), 12) + '-' + RIGHT('00000' + @MAX_naam, 5)
April 28, 2022 at 6:58 pm
Can you please show us a partial query so that we can see what you mean. No need to add all 60 date fields.
If you have something like this
April 4, 2022 at 12:31 pm
You can use TRY_CAST or TRY_CONVERT
UPDATE #Data
SET Number = TRY_CAST(Number AS float);
March 30, 2022 at 9:47 am
CursorID is an integer, not a collection.
You need to declare a variable for each field that the cursor returns
March 23, 2022 at 3:00 pm
SQL does not necessarily evaluate a CTE or sub-query when you think it does. It will un-nest them if it believes that it is more efficient to do so.
Watch the...
March 16, 2022 at 9:02 am
Viewing 15 posts - 166 through 180 (of 1,468 total)