Viewing 15 posts - 8,251 through 8,265 (of 8,753 total)
OPENROWSET expects string literals, you can do this in dynamic sql.
π
DECLARE @JPGPATH NVARCHAR(MAX) = N'''C:\temp\IMG00001.jpg''';
DECLARE @JPGBIN VARBINARY(MAX) = 0x00;
DECLARE @SQL_STR NVARCHAR(MAX) = REPLACE(N'SELECT * FROM OPENROWSET(BULK {{@JPGPATH}}, SINGLE_BLOB)...
May 14, 2014 at 7:43 am
Looks like the performance improvements have more to do with the platform (2014). I have been looking at results from the same (or identical) hardware (E6220, i5, 256GB SSD, 8Gb...
May 13, 2014 at 10:58 pm
Brilliant:-)
Ran a short disco version of the test on 2014 Developers edition, also added a Lead version which came in second!
SplitterName ...
May 13, 2014 at 2:23 pm
If the table exist, it could be in another schema. Change the code to (schema_name).[events] if you find it.
π
May 13, 2014 at 9:18 am
I'll be there Friday/Saturday
look out for the one red shoe
π
May 13, 2014 at 9:02 am
Few more numbers (500K rows), queries in the same order as before.
Take note of the high CPU cost of the LEAD function!
π
Heap, no index,
[font="Courier New"]
(100000 row(s) affected)
Table 'TBL_POLICYHISTORY'. Scan...
May 13, 2014 at 8:05 am
This should be pretty close
π
SELECT distinct CONVERT(DATETIME,arc_endTime,120) AS [Event Time],
arc_destinationHostName AS [Host Name],
arc_destinationUserName AS [User Name],
arc_sourceHostName AS [From Host],
arc_sourceAddress AS [From IP Address],
arc_deviceCustomString2 AS [Database],
arc_deviceCustomString1...
May 13, 2014 at 7:46 am
Sean Lange (5/13/2014)
rhythmk (5/13/2014)
;WITH test
AS
(SELECT POLICY_DETAILS_ID,HISTORY_ID,CODE_ID,
ROW_NUMBER() OVER(PARTITION BY POLICY_DETAILS_ID,HISTORY_ID ORDER BY code_id) AS rn
FROM @POLHIST)
SELECT POLICY_DETAILS_ID,HISTORY_ID,
MAX(CASE WHEN rn = 1...
May 13, 2014 at 7:35 am
Quick solution
π
Use tempdb;
GO
DECLARE @CUST_PAY TABLE
(
CustNO INT NOT NULL
,InvNO INT NOT NULL
,ChkNO INT NOT NULL
);
INSERT INTO...
May 12, 2014 at 3:35 pm
dndaughtery (5/12/2014)
May 12, 2014 at 3:13 pm
A lot and some, seriously the more the merrier.
π
May 12, 2014 at 2:18 pm
thomashohner (5/12/2014)
I have also been reading about portrait mode any one use this? Flip your monitor vertically for longer coding?
Apart from straining the neck:hehe:, not really, most who I have...
May 12, 2014 at 12:34 pm
Lynn Pettis (5/12/2014)
Eirikur Eiriksson (5/12/2014)
ChrisM@Work (5/12/2014)
Eirikur Eiriksson (5/12/2014)
Mike Saunders NL (5/12/2014)
The only thing that is missing is that the days with no events are not mentioned. Is...
May 12, 2014 at 11:46 am
Viewing 15 posts - 8,251 through 8,265 (of 8,753 total)