Viewing 15 posts - 6,271 through 6,285 (of 8,753 total)
Jim Shaffer (1/16/2015)
January 16, 2015 at 11:09 pm
Still further on the subject, here is a table value function spawned by Lynn's function
😎
USE tempdb;
GO
create view dbo.MyNewID as
select newid() as NewIDValue;
go
CREATE FUNCTION dbo.ITVFN_DO_SHAKESPEARE
(
@BATCHSIZE INT...
January 16, 2015 at 2:27 pm
Jeff Moden (1/16/2015)
Eirikur Eiriksson (1/16/2015)
Jeff Moden (1/16/2015)
sqldriver (1/16/2015)
You guessed right on the seconds 🙂
"Lawyers" and their "billable hours"; we should all be so lucky.
Oh my word! That's bloody well...
January 16, 2015 at 2:14 pm
Stefan Krzywicki (1/16/2015)
Thanks, but there's a part I'm not sure I get. What's the
FROM T T1,T T2,T T3,T T4,T T5,T T6,T T7
for? How does that work?
The "seed" for the...
January 16, 2015 at 1:53 pm
Further on this, if you want more normal looking text then something like this might help
😎
DECLARE @BATCHSIZE INT = 255;
DECLARE @ROWCOUNT INT = 10000;
;WITH T(N) AS (SELECT N FROM...
January 16, 2015 at 1:48 pm
Quick alteration of the code, changed to set based double loop, the trick is to a add variations to the inner loop
😎
DECLARE @BATCHSIZE INT = 255;
DECLARE @ROWCOUNT INT =...
January 16, 2015 at 1:42 pm
Jeff Moden (1/16/2015)
sqldriver (1/16/2015)
You guessed right on the seconds 🙂
"Lawyers" and their "billable hours"; we should all be so lucky.
Oh my word! That's bloody well insane. :hehe: Do...
January 16, 2015 at 12:46 pm
For fun, few different counts/metrics
😎
USE tempdb;
GO
SET NOCOUNT ON;
;with UnionTables as
(
SELECT CAST(TestDateTime AS Date) TestDate,
SerialNumber,
TestType
FROM Coat
UNION ALL
SELECT CAST(TestDateTime AS Date) TestDate,
SerialNumber,
TestType
FROM Cutoff
UNION ALL
SELECT CAST(TestDateTime AS Date) TestDate,
SerialNumber,
TestType
FROM Geo
UNION ALL
SELECT CAST(TestDateTime AS...
January 15, 2015 at 10:33 pm
sqldriver (1/15/2015)
USE tempdb
DECLARE @cntr BIGINT = 0;
;WITH T(N) AS (SELECT N FROM (VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL)) AS X(N))
,NUMS(N) AS...
January 15, 2015 at 10:25 pm
Many ways of doing this, here is one
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @SAMPLE_DATA TABLE
(
[Date] DATE ...
January 15, 2015 at 1:45 pm
Koen Verbeeck (1/14/2015)
Luis Cazares (1/14/2015)
Congratulations Koen! When I grow up I want to be like you. :hehe:Action figures will soon be available! 😎
Certainly there is a branded Witbier on it's...
January 14, 2015 at 1:11 pm
Quick though, unless you have an under-performing/resource starved system, 10000 sounds like a very small number for an insert batch size, any particular reason for this number? Cannot see it...
January 14, 2015 at 11:56 am
kiran 4243 (1/13/2015)
How to get the lowest U.Price along with FX and Rate.
ID-U.Price-FX-Rate
1280 19.1196 EUR 3.85
1280 46.2462 USD 3.63
1280 6.32 RM 1.00
Required output.
ID-U.Price-FX-Rate
1280...
January 13, 2015 at 10:54 pm
Koen Verbeeck (1/13/2015)
FYI, I received the Author of the Year award at MSSQLTips.com!Thanks everyone for voting!
Congratulations, good job and well done, justly deserved I would say!
😎
January 13, 2015 at 1:58 pm
srinivas.akyana (1/12/2015)
I have a scenario where I would need to add +4 IDs with the existing IDs, below is an example:
IDWorkloadUnits
1EXO 3
7SPO ...
January 12, 2015 at 3:48 pm
Viewing 15 posts - 6,271 through 6,285 (of 8,753 total)