Viewing 15 posts - 2,431 through 2,445 (of 2,610 total)
Or this:
;WITH CTE AS
(
SELECT E.Company,
E.Employee,
...
May 6, 2014 at 10:04 am
I think simply testing for existence should do what you need.
SELECT E.Company,
E.Employee,
E.TermDate
FROM...
May 6, 2014 at 8:46 am
Good article. Nice way of selecting all columns when detecting duplicates for a subset of the columns.
April 29, 2014 at 5:56 am
Is there a maximum number of distinct serial numbers or are there at most 7 like in your example?
April 9, 2014 at 8:05 am
I think this might be what you need:
;WITH CTE AS
(
SELECT DISTINCT
SerialBox
...
April 7, 2014 at 10:00 am
I just tried it on a bit of xml that had a DataLength of 13859 and it took 3:28 (3 minutes 28 seconds) to complete. I then tried it on...
August 5, 2013 at 7:26 am
I tried running it on a bit of xml that stores an order on our database.
It ran for over 6 minutes before I stopped it.
August 5, 2013 at 5:24 am
Using a cursor:
DECLARE myCursor cursor LOCAL FORWARD_ONLY FAST_FORWARD READ_ONLY
FOR SELECT OfficeId
FROM dbo.Office
DECLARE @OfficeId int,...
July 10, 2013 at 5:03 am
Or using CROSS APPLY:
SELECT OfficeID,
S.StateAbbr,
C.countrynames
FROM dbo.Office O
CROSS APPLY (SELECT TOP(1)
...
July 9, 2013 at 9:04 am
A csv list can also be generated using "FOR XML"
I rewrote the final query using this method:
SELECT OfficeID,
(SELECT TOP(1)
...
July 9, 2013 at 3:26 am
Hi James,
I'm not sure exactly what you are trying to do. Is it that you have a stored procedure that calls an inline table function and it's the inline table...
June 19, 2013 at 5:00 am
sagesmith (6/18/2013)
on a relative basis the spreads aren't getting more compelling for rCTE as the row count goes up.
Yes, thinking about it, the runtime for the all of the methods...
June 18, 2013 at 2:41 pm
sagesmith (6/18/2013)
I am humbly submitting this code for review by the gurus here on this forum. I think it might show that the CURSOR...
June 18, 2013 at 12:27 pm
ChrisM@Work (6/18/2013)
It is, see the post above yours 😀
I see 😛
It can also be done even more simply with an INNER JOIN and tally table (and is faster than the...
June 18, 2013 at 5:22 am
Viewing 15 posts - 2,431 through 2,445 (of 2,610 total)