Viewing 15 posts - 631 through 645 (of 3,011 total)
Age Function F_AGE_YYYY_MM_DD
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=62729
This function calculates age in years, months and days from @START_DATE through @END_DATE and returns the age in format YYYY MM DD.
Years is the number of full years...
January 20, 2012 at 2:06 pm
Have they stated why they believe it should be done?
If each of the schemas is completely independent from the others and are used by completely different applications, then I would...
January 19, 2012 at 2:24 pm
Evil Kraig F (1/19/2012)
Michael Valentine Jones (1/19/2012)
Evil Kraig F (1/19/2012)
January 19, 2012 at 1:59 pm
Evil Kraig F (1/19/2012)
January 19, 2012 at 1:36 pm
A lot depends on your network speed.
I recently moved a 400GB database (120 GB compressed Litespeed backup) by copying the full backup files over the network to the new location...
January 18, 2012 at 8:48 pm
You should check to see if there are any triggers on the table, and if those triggers are new or have been changed.
And as has been suggested, get the identity...
January 18, 2012 at 3:32 pm
Maybe some tips from the old master:
"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a...
January 18, 2012 at 3:27 pm
I have a dream that I will be judged not by the points in my reputation, but by the content of my posts.
[font="Arial Narrow"]Apologies to Martin Luther King, Jr.[/font]
January 18, 2012 at 1:27 pm
Couple of points.
This dimension seems to have no customer information except location. Wouldn't you at least want a name?
DimCustomer
- Customer Key
- Customer City
- Customer State
- Customer Zip
- Customer Country
One...
January 18, 2012 at 1:01 pm
The "select *" might load all the data pages into memory, but the index pages might not all be there.
An index rebuild on all tables would probably do the job,...
January 18, 2012 at 12:47 pm
Pam Brisjar (1/9/2012)
I'm using one of Michael's versions and I'm getting NULL values when there is a date and the time is 0....
That is something I fixed in the version...
January 9, 2012 at 6:47 pm
It depends on the setting of DATEFORMAT
set dateformat mdy
select mdy =datepart(mm, cast('2012-09-01 05:20:02.917' as datetime))
set dateformat dmy
select dmy =datepart(mm, cast('2012-09-01 05:20:02.917' as datetime))
Results:
mdy
-----------
9
dmy
-----------
1
January 9, 2012 at 3:51 pm
I simplified my original code to eliminate three DATEADD function calls and one NULLIF function call, so it might run a bit faster.
select
next_run_date ,
next_run_time ,
NEXT_RUN_DATETIME =
dateadd(mm,((next_run_date)/100%100)-1,
dateadd(yy,(nullif(next_run_date,0)/10000)-1900,
dateadd(ss,
-- Seconds
(next_run_time%100)+
-- Minutes
(((next_run_time/100)%100)*60)+
-- Hours
((next_run_time/10000)*3600)+
-- Days
(((next_run_date)%100)-1)*86400
,0)))
from
msdb.dbo.sysjobschedules...
January 9, 2012 at 9:11 am
Jeff Moden (1/7/2012)
Michael Valentine Jones (1/7/2012)
January 8, 2012 at 7:59 pm
Viewing 15 posts - 631 through 645 (of 3,011 total)