Viewing 15 posts - 3,091 through 3,105 (of 10,144 total)
ekkaldevi.naveen (7/22/2014)
I am having a table "Test" with 70 columns. Out of them a composite primary key is defined with 12 columns.
There are around 4 million records in that...
July 22, 2014 at 7:25 am
Try this. It might give you some ideas.
SELECT
cp.ServerID
, ds.[server]
, cp.MetricID
, dm.BaseMetric
, cp.MetricValue
, x.RAGLevel AS RAGSTATUS
--INTO RAGTemp
FROM DataTable cp
LEFT JOIN DimExServer ds
ON ds.ServerID = cp.ServerID
LEFT JOIN DimExMetric dm
ON...
July 22, 2014 at 5:16 am
Something like this?
DECLARE @MinPeriod int
SELECT @MinPeriod = MIN(a.period)
FROM agr.dbo.atrans a
CROSS APPLY (
SELECT CutOffTid = ISNULL(MAX(ccas_id),0)
FROM dbo.fbs_trans
) x
WHERE a.agrtid > x.CutOffTid
July 22, 2014 at 4:44 am
Have you tried timing each statement?
DECLARE @Starttime DATETIME = GETDATE()
DECLARE @CutOffTid int
SELECT @CutOffTid = isnull(max(ccas_id),0)
FROM dbo.fbs_trans (NOLOCK)
print 'Cut Off ID is ' + cast(@CutOffTid as char)
SELECT Starttime = @Starttime, Endtime...
July 22, 2014 at 4:09 am
-- change the index to support a nested loops join between rs and r
-- with seeks to r on id and residual predicate of RNT and Man:
create nonclustered index...
July 22, 2014 at 3:13 am
July 22, 2014 at 2:51 am
Hugo Kornelis (7/21/2014)
July 22, 2014 at 2:27 am
Minnu (7/21/2014)
i want to store the older records away by creating partitions.
my overrall request is,...
July 21, 2014 at 9:56 am
Minnu (7/21/2014)
and this table is mainly used for OLAP process only.
Finally...performance of table needs...
July 21, 2014 at 9:32 am
The query you posted - the opening post - doesn't contain the three-part names which are commonly associated with linked servers. How are you running this query?
July 21, 2014 at 9:08 am
DROP TABLE #Events
CREATE TABLE #Events (ID INT IDENTITY(1,1) NOT NULL, EVENTDATE DATETIME)
INSERT INTO #Events VALUES
('2014-07-20 14:42:33.360'),
('2014-07-19 14:42:33.360'),
('2014-07-18 14:42:33.360'),
('2014-07-17 14:42:33.360'),
('2014-07-16 14:42:33.360'),
('2014-07-15 14:42:33.360'),
('2014-07-14 14:42:33.360'),
('2014-07-13 14:42:33.360'),
('2014-07-12 14:42:33.360')
-- filter the table for dates between...
July 21, 2014 at 7:55 am
hoseam (7/21/2014)
declare @ToDate datetime
declare @FromDate datetime
set @FromDate = '1 Feb 2014'
set @ToDate = '28 Feb 0014'
SELECT EVENTDATE,'' AS BRANCHCD, BUSINESS_AREA, CREATE_DATE, WORK_TYPE, QUEUE, STATUS, CREATE_AGE, CATEGORYCD, DELAYREASON1, DELAYREASON2
...
July 21, 2014 at 7:32 am
hoseam (7/21/2014)
I just corrected it and I get this error "The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value."
Use CONVERT with...
July 21, 2014 at 7:21 am
Viewing 15 posts - 3,091 through 3,105 (of 10,144 total)