Viewing 15 posts - 61 through 75 (of 78 total)
One more way (so you'll have 2 options:-))
with PartFamiliesToUse as(
SELECT PartFamilyID
FROM #partsFamily
where FamilyStatus = 'Active'
EXCEPT
SELECT PartFamilyID
FROM #partsFamily
WHERE FamilyStatus <> 'Active'),
Aggr as (
SELECT PFT.PartFamilyId, STUFF((SELECT '|' +...
April 29, 2021 at 6:53 am
You can use the convert function to specify which style you want to see. To get the style that you want you need to use style number 104 (you can...
February 3, 2021 at 11:45 am
There is no single number. It depends on many factors. For example - how often the code (e.g. stored procedure or function is being used), the code of the procedure,...
November 16, 2020 at 12:50 pm
Both process request an exclusive lock on partitions on table Item. The deadlock does not occur on the table variables. By the way Do you really need to use the...
November 16, 2020 at 9:29 am
It will show you details only on plans that exist in the query cache. As soon as a query plan is being deleted from the query plan, you won't be...
November 15, 2020 at 9:37 am
Actually it is a bug. It doesn't depend on the number of partitions. I can have only 2 partitions and the optimizer will do a table scan instead of an...
July 29, 2020 at 12:21 pm
Unfortunately there is an old bug that for some reason Microsoft is not fixing. When using top clause or min or max aggregation functions on a partitioned table, SQL Server...
July 27, 2020 at 7:55 am
Another way is to specify the full XML path in the where clause (the nodes operator) and then get the value of ID:
SELECT
XC.value('.[1]', 'int')
FROM
...
July 22, 2020 at 12:31 pm
You need to write throw also in the inner procedures. If they have a catch block without throw in it, you won't see the error. Also I don't know how...
March 26, 2020 at 1:55 pm
The catch section hides the error message. If you'll add throw to it, it will send you the full error message that includes the place that the error occurred. Check...
March 26, 2020 at 11:37 am
You can also create a persisted computed column for FUNCAveMile([Mileage]) and index that column. This way you won't even have to modify the query. Of course if you can just...
November 27, 2019 at 2:35 pm
I don't think that the profiler will disappear soon, but it also will not be develop to support new features. Extended events on the other hand will continue to...
October 17, 2019 at 2:33 pm
You didn't write any details about what you are doing (a select statement with for xml clause? selecting a huge xml column? using xquery to create or modify an...
October 17, 2019 at 2:11 pm
Here is one more way:
declare @t table (id char(1), cat char(5))
insert into @t (id, cat)
select 'a', 'info'
union select 'b', 'info'
union select 'c',...
February 6, 2019 at 8:52 am
You need another END for the inner case:
SELECT
CASE WHEN CONFIG.PremiumSignShowData>0
THEN CASE SIGN (ISNULL(resultPremium,0))
WHEN '-1' THEN '-'
ELSE '+'
August 7, 2018 at 3:30 am
Viewing 15 posts - 61 through 75 (of 78 total)