Viewing 15 posts - 4,141 through 4,155 (of 8,761 total)
Quick solution
😎
USE master;
GO
SET NOCOUNT ON;
IF OBJECT_ID(N'tempdb.dbo.temp_result') IS NOT NULL DROP TABLE tempdb.dbo.temp_result;
CREATE TABLE tempdb.[dbo].[temp_result]
(
[DATABASE_NAME] [nvarchar](128) NOT NULL
,[TableName] [sysname] ...
December 29, 2015 at 4:17 am
Thank you Tom for this piece!
😎
After reading it I do have few concerns about the findings:
1. The execution times suggest that a covering index for the aggregation is in place,...
December 29, 2015 at 3:35 am
charipg (12/28/2015)
I need to set run time(dynamic) values for Startdate and Enddate in below query
Enddate should be currentdate and Startdate should be minus 7 days of...
December 29, 2015 at 12:22 am
Forgot to post the implementation of the "digits only" logic as a subquery without the using a function, here is one that fits the previously posted test harness. This code...
December 28, 2015 at 11:45 pm
Quick solution
😎
USE tempdb;
GO
SET NOCOUNT ON;
SELECT
X.[DATABASE]
,X.[PARAMETER]
,X.[VALUE]
FROM sys.databases SDB
CROSS APPLY
(
...
December 28, 2015 at 10:58 pm
Quick suggestion, use FOR XML PATH rather than EXPLICIT
😎
December 28, 2015 at 3:11 pm
ScottPletcher (12/28/2015)
I'd at least compare the performance of the straightforward brute-force method:
The Chuck Norris/Brute-force method is many times slower apart from other limitations such as input length. For certain this...
December 28, 2015 at 2:45 pm
Luis Cazares (12/28/2015)
SELECT
SI.invno
FROM dbo.TBL_SALES_ITEMS SI
WHERE SI.SIC IN ('111','222')
GROUP BY SI.invno
HAVING COUNT( DISTINCT SI.SIC)...
December 28, 2015 at 1:15 pm
Alan.B (12/28/2015)
Someone beat me to it but NOLOCK table hints are the #1 mistake I have seen. I would go so far as to say...
December 28, 2015 at 1:06 pm
harishyarlagadda2020 (12/28/2015)
Thank you Eirikur! I am using rownum% value= 0 rather than '<1'.This helped.
You are very welcome.
😎
December 28, 2015 at 12:55 pm
Ed Wagner (12/28/2015)
December 28, 2015 at 12:54 pm
This is straight forward, select from the table where (Row_Number % Divisor) is less than one, rounding will not give the right results because of the loss of precicion.
😎
Quick sample
;WITH...
December 28, 2015 at 12:31 pm
Eric M Russell (12/28/2015)
On the fly data type conversion and transformations, both explicit and implicit
Distributed queries (ie: joining tables between multiple instances...
December 28, 2015 at 8:15 am
SQL Server is fully ACID (Atomicity, Consistency, Isolation, Durability), if you need functionality outside the ACID then use Jeff's suggestion and output the log to a file, that temp table...
December 27, 2015 at 11:48 pm
Another wild guess
😎
USE tempdb;
GO
IF OBJECT_ID(N'dbo.TBL_SALES_ITEMS') IS NOT NULL DROP TABLE dbo.TBL_SALES_ITEMS;
CREATE TABLE dbo.TBL_SALES_ITEMS
(
SI_ID INT IDENTITY(1,1) ...
December 27, 2015 at 11:16 pm
Viewing 15 posts - 4,141 through 4,155 (of 8,761 total)