Viewing 15 posts - 3,841 through 3,855 (of 10,144 total)
WayneHess (12/30/2013)
December 30, 2013 at 10:07 am
Wayne, it may look like your query is close, but I'd still recommend starting again. Here's a good point from which to start:
DECLARE @School int, @Term int, @Score varchar(2), @Task...
December 30, 2013 at 9:44 am
Sure, pretty straightforward - use ROW_NUMBER() as for Scenario 2. Can you give it a shot?
December 30, 2013 at 7:27 am
DROP TABLE #NewTempTable
CREATE TABLE #NewTempTable
(
StartTime DATETIME,
EndTime DATETIME,
ServerName VARCHAR(10),
Databasename VARCHAR(10),
STATUS VARCHAR(10)
)
INSERT INTO #NewTempTable (StartTime, EndTime, ServerName, Databasename, [STATUS]) VALUES
( '2013-12-23 15:00:48.847' , '2013-12-23 15:00:48.852' , 'Server A' , 'DB A'...
December 30, 2013 at 7:10 am
raghuldrag (12/30/2013)
ChrisM@Work,can't process ur code becz i ve more than 5 lakh data 's from year wise of '2007 to 2013' date wise bills
Then how are you - or we...
December 30, 2013 at 5:35 am
raghuldrag (12/30/2013)
create table estr
(
custo int,
product varchar(20),
val int,
billed_date datetime
)
insert into estr(custo,product,billed_date,value) values('10','Milk','2013-04-11','2000')
insert into estr(custo,product,billed_date,value) values('10','Milk','2013-04-21','500')
insert into estr(custo,product,billed_date,value) values('10','Milk','2013-05-05','100')
insert into estr(custo,product,billed_date,value) values('10','Milk','2013-05-11','2000')
insert into estr(custo,product,billed_date,value) values('10','fruits','2013-05-11','500')
insert into estr(custo,product,billed_date,value) values('30','fruits','2013-04-11','2000')
insert...
December 30, 2013 at 5:17 am
;WITH rCTE (TaskID, BasedOn, Interval, TaskLevel, TotalInterval) AS (
SELECT TaskID, BasedOn, Interval,
1 AS TaskLevel,
TotalInterval = Interval
FROM #tblTasks
WHERE TaskID = 1
UNION ALL
SELECT e.TaskID, e.BasedOn, e.Interval,
c.TaskLevel + 1,
TotalInterval...
December 30, 2013 at 5:16 am
Lowell (12/27/2013)
if you want solid help like that...
December 30, 2013 at 5:04 am
Nottingham - being mistaken for one of the entertainment crew. Making holes in the lawn with Hugo K and hearing his MERGE talk. Hearing most of Grant Fritchey's talk and...
December 30, 2013 at 4:09 am
Here are a couple of potential solutions. They are only "potential" because there isn't any sample data to interrogate. I've knocked up a sample table to assist you and others....
December 30, 2013 at 3:56 am
DECLARE
@AcquisitionServerAlias sysname = 'AcquisitionServer3' ,
@AcquisitionDBName sysname = 'Mydb',
@begintime datetime = '2013-12-29 19:52:27.760',
@FromSQL nvarchar(300),
@FromParam nvarchar(50),
@ReturnFromLSNValue binary(10),
@fromLSN binary(10)
SET @FromSQL = 'SELECT @FromLSNOUT = fromLSN FROM OPENQUERY ('+@AcquisitionServerAlias+', ''SELECT '+@AcquisitionDBName+'.sys.fn_cdc_map_time_to_lsn('+@begintime+')as fromLSN'')'
PRINT @FromSQL
'Msg...
December 30, 2013 at 3:02 am
saum70 (12/30/2013)
Thanks for your replies. Yes Group by was missing but it was not the concern. Anyways, i figured out and got the performance. I used clustered index on...
December 30, 2013 at 2:48 am
GilaMonster (12/30/2013)
December 30, 2013 at 2:39 am
Viewing 15 posts - 3,841 through 3,855 (of 10,144 total)