Viewing 15 posts - 9,196 through 9,210 (of 26,490 total)
As it looks like your servers are not part of the same domain and are using local service accounts, you may need to look at using certificates to configure the...
December 8, 2012 at 10:12 am
No. You need to restore all the files of the database.
December 7, 2012 at 7:53 am
kk.86manu (12/7/2012)
I just have one more clarification
IF '12/07/2012'<'12/01/2013'
For the mentioned condition the first value is the same and second value is greater and again the condition...
December 7, 2012 at 3:15 am
Peter Pirker (12/7/2012)
It looks like you got it right the first time - although I'm not sure I fully understand it (yet).
Unfortunately i haven't had time to provide you...
December 7, 2012 at 3:06 am
Unfortunately you haven't been much help. You still haven't provided us with the information I requested which just makes it harder to try and provide you with an answer...
December 7, 2012 at 12:05 am
Here is another solution to the problem:
CREATE TABLE dbo.UpdateGaps(
MachineID int NOT NULL,
RecordedDate datetime NOT NULL,
Pressure float NULL,
CONSTRAINT PK_UpdateGaps PRIMARY KEY...
December 6, 2012 at 10:44 pm
What would help is if you could post the DDL (CREATE TABLE statement) for the tables involved, the sample data as a series of INSERT INTO statements to populate the...
December 6, 2012 at 8:08 am
Jeff Moden (12/4/2012)
Lynn Pettis (12/4/2012)
Jeff Moden (12/4/2012)
That, not withstanding, it's always the "edge cases" that cause panic stricken calls at 3 in the...
December 5, 2012 at 7:51 am
It shouldn't since you can't run insert, update, or delete statements. In addition you can't update the statistics or reorganize or rebuild indexes.
December 4, 2012 at 6:48 pm
sgmunson (12/4/2012)
Lynn Pettis (12/4/2012)
DECLARE @date DATE = '20121202';
SELECT
CASE WHEN datename(dw,@date) <> 'Sunday' THEN CONVERT(varchar(10), DATEADD(WK, DATEDIFF(WK, 0, @date), 0),
103) ELSE CONVERT(varchar(10), DATEADD(WK, DATEDIFF(WK, 0, @date), - 7), 103)...
December 4, 2012 at 5:57 pm
Jeff Moden (12/4/2012)
Then substitute a 0 for Michael's -53690. 😀That, not withstanding, it's always the "edge cases" that cause panic stricken calls at 3 in the morning.
If I have to...
December 4, 2012 at 5:48 pm
Michael Valentine Jones (12/4/2012)
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]=...
December 4, 2012 at 4:09 pm
sgmunson (12/4/2012)
Lynn Pettis (12/4/2012)
DECLARE @date DATE = '20121202';
SELECT
CASE WHEN datename(dw,@date) <> 'Sunday' THEN CONVERT(varchar(10), DATEADD(WK, DATEDIFF(WK, 0, @date), 0),
103) ELSE CONVERT(varchar(10), DATEADD(WK, DATEDIFF(WK, 0, @date), - 7), 103)...
December 4, 2012 at 11:22 am
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]= getdate()+4union all
select...
December 4, 2012 at 11:17 am
sgmunson (12/4/2012)
How about:
CASE
WHEN DATEPART(dw, THE_DATE) = 1 THEN DATEADD(dd, -6, THE_DATE)
ELSE DATEADD(dd, 0 - (DATEPART(dw, THE_DATE) - 2), THE_DATE)
END
where THE_DATE is assumed to be the date field...
No conditional logic required:
DECLARE...
December 4, 2012 at 11:04 am
Viewing 15 posts - 9,196 through 9,210 (of 26,490 total)