Viewing 15 posts - 4,561 through 4,575 (of 8,761 total)
Quick suggestion
😎
USE tempdb;
GO
SET NOCOUNT ON;
/* Sample data from OP */
DECLARE @EXISTING TABLE
(
[Month(YYYYMM)] INT NOT NULL
,Department...
September 14, 2015 at 12:28 am
Thank you Jason for this write up, very good reference indeed!
😎
September 13, 2015 at 10:13 pm
vsamantha35 (9/13/2015)
Hi All,What does the command do or what does it mean? When do we use it?
Alter login [<loginname>] with name = [<loginname>];
Thanks in advance.
ALTER is a short-cut for...
September 13, 2015 at 12:53 pm
Have you checked the [Install dir]\MSSQL\Log\ERRORLOG file?
😎
September 13, 2015 at 12:37 pm
Ed Wagner (9/13/2015)
whereisSQL? (9/12/2015)
Ed Wagner (9/11/2015)
BWFC (9/11/2015)
Ed Wagner (9/11/2015)
Eirikur Eiriksson (9/11/2015)
anthony.green (9/11/2015)
whereisSQL? (9/10/2015)
Ed Wagner (9/10/2015)
DonlSimpson (9/10/2015)
Ed Wagner (9/10/2015)
djj (9/10/2015)
Ed Wagner (9/10/2015)
whereisSQL? (9/10/2015)
Luis Cazares (9/10/2015)
UniverseHe-Man
Conan
Sword
Katana
Samurai
Shogun
Shaolin
Monastery
Hermetic
Seal
Karate Kid
Wax
Shine
Shoe
Walk
September 13, 2015 at 12:13 pm
Jeff Moden (9/13/2015)
September 13, 2015 at 10:53 am
There is a subtle difference between these two queries, when measured back to back on 10^6 numbers then the former is around 25% faster than the latter although the difference...
September 13, 2015 at 6:08 am
Using heap to speed the inserts is like a very bad Credit Card deal, no transaction fees but X000% Annual interest rate:pinch:
😎
Jeff Moden (9/12/2015)
September 13, 2015 at 1:10 am
chetta (9/12/2015)
I have an insert statement similar to:
insert into dbo.CHILD (ChildMotherID, ChildNo)
values
(
(select MotherID from dbo.Mother where MotherName = 'Suzie Q'),
(select max(ChildrenAmt)+1 from dbo.Children where ChildrenMotherID =
(select MotherID from...
September 13, 2015 at 1:00 am
Two quick suggestions, first uses the DelimitedSplit8K function for a simple delimited list of parameters and the second uses XML for more complex parameter structure.
😎
Simple parameter string
USE tempdb;
GO
SET NOCOUNT ON;
GO
IF...
September 13, 2015 at 12:30 am
pietlinden (9/11/2015)
CREATE TABLE Actuals (
FY INT
,P1 SMALLMONEY
,P2 SMALLMONEY
,P3 SMALLMONEY
,P4 SMALLMONEY
,P5 SMALLMONEY
,P6 SMALLMONEY
,P7 SMALLMONEY
,P8 SMALLMONEY
,P9 SMALLMONEY
,P10 SMALLMONEY
,P11 SMALLMONEY
,P12 SMALLMONEY
CONSTRAINT pkActuals PRIMARY KEY (FY)
);
GO
-- insert some dummy values...
INSERT INTO dbo.Actuals(FY,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P2)
--...
September 13, 2015 at 12:10 am
Quick suggestion with inline tally table
😎
DECLARE @BoxesNeeded INT = 15;
;WITH T(N) AS (SELECT N FROM (VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL)) AS X(N))
, NUMS(N) AS (SELECT TOP(@BoxesNeeded) ROW_NUMBER() OVER (ORDER...
September 12, 2015 at 11:16 pm
Steve Jones - SSC Editor (7/23/2015)
September 12, 2015 at 4:52 am
Quick suggestion
😎
/* Safe place */
USE tempdb;
GO
SET NOCOUNT ON;
GO
DECLARE @METADATA TABLE
(
ReportID ...
September 12, 2015 at 2:45 am
Viewing 15 posts - 4,561 through 4,575 (of 8,761 total)