Viewing 15 posts - 706 through 720 (of 3,011 total)
This will work OK no matter what the setting for DATEFIRST is:
select
DATE,
WeekStartDate = dateadd(dd,(datediff(dd,'17530107',a.DATE)/7)*7,'17530107')
from
(
selectDATE = getdate()union all
selectDATE = getdate()-7union all
selectDATE = getdate()-(7*2)union all
selectDATE = getdate()-(7*3)union all
selectDATE = getdate()-(7*4)
) a
order by
a.DATE...
November 8, 2011 at 8:32 am
You can set the initial size of the data and log files in the CREATE DATABASE statement:
CREATE DATABASE Sales
ON
( NAME = Sales_data,
FILENAME = 'D:\MSSQL\Data\Sales_data.mdf',
...
November 7, 2011 at 2:29 pm
Approximate numbers, but close enough.
Count Version
----- --------
5 7.00
160 2000
140 2005
40 2008
10 2008 R2
We have a...
October 21, 2011 at 10:10 am
I doubt that you can kill it. You will probably have to restart SQL Server.
October 13, 2011 at 10:43 am
According to SQL Server 2008 R2 Books Online topic "Report Server Database":
http://technet.microsoft.com/en-us/library/ms156016.aspx
"...
Report Server Temporary Database
Each report server database uses a related temporary database to store session and execution data,...
October 5, 2011 at 2:24 pm
This script should help you shrink the data files. However, shrinking the data files will cause a lot of index fragmentation, so you should defragement or reindex all the...
October 4, 2011 at 3:23 pm
Cadavre (9/30/2011)
Michael Valentine Jones (9/30/2011)
select
a.dt,
IsValidDateTime =
case
-- Check that date string is in correct format, mm/dd/yyyy hh:mm:ss
when dt...
September 30, 2011 at 12:24 pm
Here is a fairly simple check that will work with any setting of DATEFIRST:
select
a.dt,
IsValidDateTime =
case
-- Check that date string is in correct format, mm/dd/yyyy hh:mm:ss
when dt not like '[0-1][0-9]/[0-3][0-9]/[1-9][0-9][0-9][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9]'
then...
September 30, 2011 at 10:57 am
What exactly do you mean by "julian time"?
I have never heard of a definition of Julian Date (or time) that would convert 24701 to 11:53:46.
Without know (or guessing) what unit...
September 21, 2011 at 10:53 am
If yout have any input into how the application is coded, you should also look into why there is such a high percentage of single-use plans and if you can...
September 20, 2011 at 8:11 pm
That is a very complicated subject, and is certainly not as simple as your vendor stated. You should read this article before taking any action.
A SQL Server DBA myth...
September 19, 2011 at 10:33 pm
aflores1-976495 (9/15/2011)
Basically Transaction...
September 15, 2011 at 3:45 pm
This one is fairly short and I did a lot of testing to verify it works OK:
ISO Week of Year Function
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=60510
This has the week and day of week included:
ISO Year...
September 15, 2011 at 2:01 pm
OK, thanks for the info.
September 14, 2011 at 9:10 am
"!=" is another way of forming a "not equal" operator, like "<>".
"!=" is not ISO standard, so it is better to use "<>".
September 13, 2011 at 12:48 pm
Viewing 15 posts - 706 through 720 (of 3,011 total)