Viewing 15 posts - 24,511 through 24,525 (of 59,099 total)
Basically, you're trying to do formatting and calculations at the same time and that's causing a really nasty sort if you look at the execution plan not to mention a...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 10:11 pm
Thanks for the feedback and the Tweet, Dwaine.
I guess enough people have made the mistake of allowing NULLable StartDates (seriously??? :blink:) and/or EndDates that it warrants a follow up article...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 9:25 pm
Imran Nazir (2/1/2014)
You need to use INSTEAD OF UPDATE trigger as well.
I realize that you and I are responding to an 8 year old post but I wouldn't do this...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 9:00 pm
peerless (2/1/2014)
What should I do?
I'm with Chris on this one. Stop making people try to eat a rolling donut by changing your code from post to post. And...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 8:44 pm
Hmmmm... there IS a way to do this in a SARGable fashion (although fixing the column is still the best idea). I just need to know how Jan thru...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 8:31 pm
Golden_eye (2/2/2014)
I have a probllem with one part of my script which is:
where BillingMonth = '10/2013'
It is working fine now, but I need to change it to
where BillingMonth >=...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 8:26 pm
You're going to continue to have problems with date calculations for these types of things. My recommendation is to save yourself a bit of headache and create a Calendar...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 7:47 pm
pietlinden (2/2/2014)
What you want is probably something likeSELECT TOP 1 SomeDateColumn
FROM MyTable
WHERE SomeDateColumn<=GETDATE();
GETDATE() returns the current date...
I believe that's missing an ORDER BY.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 5:45 pm
sharadkkw (1/30/2014)
I want to create a job which will...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 4:10 pm
sqlsniper (2/2/2014)
You could also take a look at Windowstooling, like perfmon and the typeperf tooling.
Perfect! How do you store that in a table in SQL Server? 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 3:44 pm
Koen Verbeeck (2/2/2014)
asranantha (2/2/2014)
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 3:42 pm
davoscollective (2/2/2014)
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 12:32 pm
sqldriver (2/1/2014)
Yes, Jeff, now give me something to spend all this DBA money on that wasn't bottled and corked by a guy in a kilt.
BWAAA-HAAAA!!!!! I know that guy!...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 8:52 am
Michael Meierruth (2/2/2014)
Jeff Moden (2/1/2014)
There is a method that'll blow the doors off of even LAG but a lot of people are afraid of it.
Thus are you referrring to CROSS...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 2, 2014 at 8:46 am
oliver.morris (1/28/2014)
Thanks for your help in advance, much appreciated.
I have a table which I would like to format like so:
From this:
CREATE TABLE [dbo].[Table_1](
[ID] [int] IDENTITY(1,1) NOT NULL,
[header] [varchar](50) NULL,
[citation] [varchar](200)...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 1, 2014 at 9:16 pm
Viewing 15 posts - 24,511 through 24,525 (of 59,099 total)