Viewing 15 posts - 46 through 60 (of 311 total)
No thanks. Interested in SQL2008 32-bit as well?
January 6, 2012 at 1:21 pm
SQL Kiwi (1/6/2012)
Peter Brinkhaus (1/6/2012)
Using 256MB memory it failed 7 out of 8 times. Ran it once with 512MB, failed also. Ran it once with 1GB, succesfully.
Excellent, a 32-bit confirmation,...
January 6, 2012 at 12:51 pm
SQL Kiwi (1/6/2012)
January 6, 2012 at 11:51 am
If replacing potential delimiters is sufficient, then there no need for splitting the field. Just replace potential delimiters with a unified delimiter and surround the code to search for with...
January 6, 2012 at 9:36 am
DECLARE @SampleData TABLE ([DESC] VARCHAR(10))
INSERT INTO @SampleData
VALUES ('abc'), ('u&w<yz')
SELECT
CA.Result.value('.', 'VARCHAR(30)')
FROM
@SampleData SD
CROSS APPLY
(
SELECT
-- Surround every character with [] using an index...
January 2, 2012 at 11:57 am
shadow_2 (12/14/2011)
What is the benefit of the OUTER APPLY? To eliminate the additional SELECT and GROUP BY on the storechanges?
Look at the actual execution plans. The first one contains a...
December 14, 2011 at 12:00 pm
ChrisM@home (12/14/2011)
Quick today, Peter. I see you've also commented on a sort column 😎
Funny, almost same query, same execution plan. Note that the solutions probably do not scale very well...
December 14, 2011 at 6:25 am
Maybe this one will do. I added the max. date to the group for sorting.
DECLARE @T TABLE ([Value] INT, [Date] DATETIME)
INSERT INTO @T([Value], [Date]) VALUES (5, '01/01/2011 00:00:00')
INSERT INTO @T([Value],...
December 14, 2011 at 5:47 am
Or better:
SELECT
V.visitID, V.storenr, COALESCE(OA.prev_storetype, S.storetype) storetype
FROM
#visits V
JOIN
#stores S ON S.storenr = V.storenr
OUTER APPLY
(
SELECT TOP 1
storenr, changedate, prev_storetype
...
December 14, 2011 at 5:11 am
If I understand your requirement correctly:
SELECT
V.visitID, V.storenr, COALESCE(SC.prev_storetype, S.storetype) storetype
FROM
#visits V
JOIN
#stores S ON S.storenr = V.storenr
LEFT JOIN
#storechanges SC ON SC.storenr = S.storenr...
December 14, 2011 at 5:04 am
Maybe this one will do?
WITH SampleData AS
(
SELECT * FROM (VALUES
(0, 'blue', 'bob'),
(1, 'red', 'bob'),
(3, 'purple', 'bob'),
...
December 7, 2011 at 1:53 am
Jeffrey Williams 3188 (11/25/2011)
Peter Brinkhaus (11/25/2011)
Jeffrey Williams 3188 (11/25/2011)
November 25, 2011 at 11:23 am
Jeffrey Williams 3188 (11/25/2011)
November 25, 2011 at 8:40 am
Try
EXEC sp_refreshview 'EmployeeAddress'
The view is non-schemabound so you have to refresh it's metadata when altering the underlying tables.
November 25, 2011 at 1:44 am
In Method 1 the result type of the REPLICATE function will be implicitly VARCHAR(5000) because the input expression is VARCHAR.
Because it is concatenated with an NVARCHAR(MAX) expression this
VARCHAR(5000) expression will...
November 23, 2011 at 11:49 pm
Viewing 15 posts - 46 through 60 (of 311 total)