Viewing 15 posts - 4,561 through 4,575 (of 8,753 total)
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
SQLPain (9/11/2015)
Msg 195, Level 15, State 10, Line 3
'ROW_NUMBER' is not a recognized function name.
Msg 156,...
September 12, 2015 at 2:13 am
tt-615680 (9/12/2015)
I have a database which gets refreshed on the daily by restoring 1 transactional file log, at the moment it is done manually but I'm trying to create...
September 12, 2015 at 2:09 am
Alan.B (9/11/2015)
September 12, 2015 at 2:00 am
Further on the topic, the input tree is generated during the parsing and binding phase. Since the query processor does not evaluate variable values during this stage, this step produces...
September 12, 2015 at 1:55 am
Alvin Ramard (9/11/2015)
Eirikur Eiriksson (9/11/2015)
Alvin Ramard (9/11/2015)
Anyone use dbForge Studio to generate diagrams?
Did try it briefly few years back, not bad but it didn't end up in the tool...
September 11, 2015 at 11:45 am
Alvin Ramard (9/11/2015)
Anyone use dbForge Studio to generate diagrams?
Did try it briefly few years back, not bad but it didn't end up in the tool chest, main reason being...
September 11, 2015 at 10:02 am
Luis Cazares (9/11/2015)
ZZartin (9/11/2015)
PizzaAlways
pronto
September 11, 2015 at 9:41 am
Mike Sofen-356112 (9/11/2015)
Eirikur Eiriksson (9/11/2015)
September 11, 2015 at 9:26 am
Viewing 15 posts - 4,561 through 4,575 (of 8,753 total)