Viewing 15 posts - 31 through 45 (of 3,010 total)
You can calculate the dates you want directly:
;with TestData_cte as (
select date = convert(date,getdate())union all
select data = '20141201'union all
select data = '20141231'union all
select data = '20150101' )
select
DATE,
FirstMonOfPriorMonth =
dateadd(dd,(datediff(dd,'17530101',
dateadd(mm,-1+datediff(mm,0,a.Date),6)
)/7)*7,'17530101'),
DayBeforeFirstMonOfCurrMonth =
dateadd(dd,((datediff(dd,'17530101',
dateadd(mm,datediff(mm,0,a.Date),6)
)/7)*7)-1,'17530101')
from
TestData_cte ...
December 29, 2014 at 9:58 pm
I do it this way:
1. Set it offline to clear the connections
2. Bring it back online.
3. Drop the database.
Dropping the database ensures that there can be no connections, since...
December 26, 2014 at 10:37 pm
Companies use a fiscal year and fiscal periods that best suit their business.
Retail companies often use a fiscal year that nominally starts in February, but on a week boundary so...
December 26, 2014 at 10:24 pm
If you can, use FLOAT instead of the REAL datatype. The REAL datatype has limited precision, and the conversion from the internal base 2 to base 10 results in...
December 26, 2014 at 9:53 pm
My experience is that application tuning does not have to be expensive, and is usually far more cost effective and faster than upgrading hardware.
I have a methodology that I use...
December 26, 2014 at 6:36 pm
Hard copy edition:
http://www.amazon.com/Oracle-Business-Intelligence-Developers-Guide/dp/0071798749
Kindle edition:
http://www.amazon.com/Oracle-Business-Intelligence-Developers-Guide-ebook/dp/B009E71X0G
10 Day Free Trial:
https://www.safaribooksonline.com/library/view/oracle-business-intelligence/9780071798747/
December 26, 2014 at 1:56 am
Software vendor "Support Engineers" usually have very little knowledge of SQL Server (just like their developers and system designers :(), but love to spout nonsense to deflect problems with their...
December 20, 2014 at 4:01 am
Does anyone know if it is still an issue with SQL Server 2014?
It looks like MS was putting up some kind of claim that it was by design. Meaning...
December 20, 2014 at 3:25 am
Could you try the statement below on a development or test server using a full sized table?
The storage size for numeric precision of 12 or 18 is exactly the same...
December 20, 2014 at 1:16 am
Have you done any IO performance testing on the two servers with SQLIO or any other IO performance testing utility?
I would start with that.
December 5, 2014 at 7:42 pm
If the account you are running the SSIS package with is the same as the SkyDrive/OneDrive) account and you are running it on a machine that is connected to OneDrive,...
November 17, 2014 at 1:58 am
Just some ideas:
Limit the number of forum posts to one or two per day, especially new topics, for a while, say a couple of weeks, after they sign up.
Automatically flag...
August 19, 2014 at 3:21 pm
Is this a homework question?
August 15, 2014 at 7:55 am
Using the date table function on the link below, here are the queries you can use.
Date Table Function F_TABLE_DATE
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61519
select
Sunday = [Date]
from
F_TABLE_DATE('08/01/2014','08/31/2014')
where
-- Select Sunday
ISO_DAY_OF_WEEK = 7
select
Monday = [Date]
from
F_TABLE_DATE('08/01/2014','08/31/2014')
where
--...
August 8, 2014 at 10:56 am
Michael Valentine Jones (7/25/2014)
ChrisSut (7/25/2014)
This is a legal requirement, we cannot keep health records of US citizens in Canada...
August 1, 2014 at 3:53 pm
Viewing 15 posts - 31 through 45 (of 3,010 total)