Viewing 15 posts - 2,476 through 2,490 (of 2,648 total)
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
I thought this looked a good candidate for CROSS APPLY:
insert into dbo.def
(
SeqNo,
Date_Field,
Payment
)
SELECT A.Seqno,
...
June 18, 2013 at 3:53 am
tom-580235 (6/17/2013)
June 17, 2013 at 10:21 am
Nice article and some good links to useful videos
March 21, 2013 at 11:55 am
Edward.Polley 76944 (3/7/2013)
BTW - Ceiling works here because these are integer variables.Thanks,
It doesn't work in your algorithm. I've pulled it apart to see what it does if there...
March 7, 2013 at 3:27 pm
Divine Flame (3/7/2013)
Who is the author of this article? "Todd Thiemann" or "Ashvin Kamaraju" ?:-D
It does seem a bit too close for comfort to this article:
But then again at the...
March 7, 2013 at 7:13 am
The code in the article doesn't check that the EventCloseDate older than 6 days when it does the delete. Is it that the EventCloseDate is always present and monotonically increasing...
March 6, 2013 at 4:19 am
I think the creation of a separate view is unnecessary when you can have the view inline:
DECLARE @Rowcount int
SET @Rowcount = -1 -- Initialise
WHILE @Rowcount <> 0
BEGIN
...
March 6, 2013 at 12:31 am
Viewing 15 posts - 2,476 through 2,490 (of 2,648 total)