Viewing 15 posts - 11,521 through 11,535 (of 26,486 total)
drew.allen (6/5/2012)
June 5, 2012 at 12:36 pm
Sean Lange (6/5/2012)
--------------------------
Table...
June 5, 2012 at 10:20 am
Other than changing this:
and DATEPART(YEAR, e.eecDateOfLastHire) = @yearpicked
to this:
and e.eecDateOfLastHire >= dateadd(yy, (@yearpicked - 1900), 0) and e.eecDateOfLastHire < dateadd(yy, (@yearpicked - 1900) + 1, 0)
Your code doesn't necessarily need...
June 5, 2012 at 10:09 am
David Moutray (6/5/2012)
June 5, 2012 at 9:57 am
David Moutray (6/5/2012)
Also, Google is fallible. There are...
June 5, 2012 at 9:44 am
David Moutray (6/5/2012)
I know, I must have...
June 5, 2012 at 9:30 am
First, my favorite President is Theodore Roosevelt. After reading this little bit about President Lincoln though, I realize that if I were elected President (never happen) that I would...
June 5, 2012 at 9:23 am
Try this:
select
year(OrderDate) AS OrderYear,
MonthForTheYear = CASE WHEN MONTH(OrderDate)=1 THEN 'January'
...
June 5, 2012 at 9:07 am
David Moutray (6/5/2012)
YMMV on that one
Oh, and I absolutely despise abbreviations! What, are you too lazy to type it out?
What the *&(^% does YMMV stand for?
(See what...
June 5, 2012 at 8:53 am
When you run the stored procedure in SSMS do you run it as the same user that attempts to run it from the application?
June 5, 2012 at 8:40 am
LightVader (6/5/2012)
Michael Valentine Jones (5/24/2012)
Brevity and obscurity
declare @ char(3)
set @=0
while @<100
begin
set @=@+1
case when @%15=0 then 'FizzBuzz'
when @%3=0 then 'Fizz'
when @%5=0 then 'Buzz'
else @ end
end
I didn't realize that you didn't need...
June 5, 2012 at 6:39 am
krypto69 (6/4/2012)
thanks Geoff! exactly what I needed!
Just remember that this, and DATEPART(YEAR, e.eecDateOfLastHire) = @yearpicked, won't make use of an index on e.eecDateOfLastHire if it exists.
June 4, 2012 at 2:41 pm
And the DDL for the tables and the execution plan.
June 4, 2012 at 2:15 pm
Lynn Pettis (6/4/2012)
r.pe (6/4/2012)
Does not seem to be. I have included the def in the attachement.Thanks.
Even that function has a function call, dbo.fn_NTDayOfWeek.
Okay, missed this one: dbo.fn_FirstDayOfMonth.
June 4, 2012 at 2:02 pm
r.pe (6/4/2012)
Does not seem to be. I have included the def in the attachement.Thanks.
Even that function has a function call, dbo.fn_NTDayOfWeek.
June 4, 2012 at 1:55 pm
Viewing 15 posts - 11,521 through 11,535 (of 26,486 total)