Viewing 15 posts - 346 through 360 (of 3,011 total)
Lynn Pettis (12/4/2012)
Michael Valentine Jones (12/4/2012)
selecta.*,
Monday = dateadd(dd,(datediff(dd,-53690,a.DATE)/7)*7,-53690)
from
( -- Test Data
select [Date]= getdate()-2union all
select [Date]= getdate()-1union all
select [Date]= getdate()union all
select [Date]= getdate()+1union all
select [Date]= getdate()+2union all
select [Date]= getdate()+3union all
select [Date]=...
December 4, 2012 at 12:47 pm
select
a.*,
Monday = dateadd(dd,(datediff(dd,-53690,a.DATE)/7)*7,-53690)
from
( -- Test Data
select [Date]= getdate()-2union all
select [Date]= getdate()-1union all
select [Date]= getdate()union all
select [Date]= getdate()+1union all
select [Date]= getdate()+2union all
select [Date]= getdate()+3union all
select [Date]= getdate()+4union all
select [Date]= getdate()+5union all
select...
December 4, 2012 at 11:07 am
A calendar table is not really needed for this:
select
YearMonth = dateadd(mm,datediff(mm,0,[recorddate]),0),
MyValueSum = sum([myvalue])
from
#a
group by
dateadd(mm,datediff(mm,0,[recorddate]),0)
order by
dateadd(mm,datediff(mm,0,[recorddate]),0)
Results:
YearMonth ...
December 3, 2012 at 10:51 am
I would go with the approach of having the check in the update statement.
Also, I would open the transaction in the stored procedure instead of the .net code and commit...
November 30, 2012 at 10:23 pm
ofg1983 (11/30/2012)
Let me begin by stating, I am rookie when it comes to SQL, I am just starting to learn SQL and I apologize if this is a...
November 30, 2012 at 11:06 am
TravisDBA (11/28/2012)
November 28, 2012 at 3:36 pm
Probably not what you are looking for, but...
http://en.wikipedia.org/wiki/1964_Philadelphia_Phillies_season
"...The 1964 Philadelphia Phillies held a six and a half game lead in an exceptionally strong National League with 12 games to play....
November 28, 2012 at 11:07 am
chetanr.jain (1/10/2011)
i have my production database on SQL 2000 Enterprise Edition.
Now to test one of the component, i need to restore the backup to another server. To save on...
November 28, 2012 at 10:59 am
DKlein (11/26/2012)
November 26, 2012 at 1:21 pm
Jeff Moden (11/26/2012)
Steve Jones - SSC Editor (11/26/2012)
Jeff Moden (11/26/2012)
Michael Valentine Jones (11/25/2012)
I think they quote most mechanical disks with a MTBF of 1 million+ hours. I have to...
November 26, 2012 at 1:01 pm
DKlein (11/26/2012)
November 26, 2012 at 9:42 am
Jeff Moden (11/26/2012)
...The writes are another thing caused simply by a lack of understanding of how to update data from one system to another. It involves mostly 2 large...
November 26, 2012 at 8:27 am
Jeff Moden (11/25/2012)
FusionIO has listed 2 million hours and 6 years write endurance for their cards, ...
Perhaps I'm reading something wrong but 6 years is only about 52,596 hours. ...
November 25, 2012 at 3:01 pm
Jeff Moden (11/25/2012)
Michael Valentine Jones (11/24/2012)
November 25, 2012 at 2:58 pm
For drives that are meant to be Enterprise Class, the lifetime should be long enough for almost any application.
The 400 GB drive on this link is rated a 35 PB...
November 24, 2012 at 10:04 pm
Viewing 15 posts - 346 through 360 (of 3,011 total)