Viewing 15 posts - 376 through 390 (of 728 total)
Use it like this:
Select TOP 10 Device.nDeviceID,
Device.sDisplayName,
sgroupname,
sDescription,
dPollTime,
MIN(nUsed_Min),
MAX(nused_Max),
SUM(nSize),
(CAST(SUM(nUsed_Min) AS FLOAT(2)) / CAST(SUM(nSize) AS FLOAT(2)) * CAST(AVG(100) AS NUMERIC(10, 2))) AS Inuse
from statisticalDisk
where (CAST(SUM(nUsed_Min) AS FLOAT(2))...
May 21, 2013 at 2:03 am
Hope this helps:
with CTE1(Id, name, value1, value2, value3)
AS(
SELECT Id, name, value1, value2, value1+value2 AS value3
FROM dbo.T1 a
WHERE a.Id = 1
UNION all
SELECT a.Id, a.name, a.value1, a.value2, b.value3+a.value2
FROM dbo.T1 a
inner join CTE1...
May 21, 2013 at 1:58 am
Nice question. Had to give lots of time to go through each statement. 🙂
May 20, 2013 at 1:22 am
Lolz. Start taking backups and put a strategical purging mechanism in place for tables to purge old data. The data will be saved in the backups taken. No big deal....
May 17, 2013 at 4:10 am
Hi Mahi, I'll not give you the exact solution, but here is the clue:
selectsu.uid, su.name, su1.uid, su1.name
fromsys.sysuserssu
inner join sys.sysmemberssm on su.uid = sm.memberuid
inner join sys.sysuserssu1 on sm.groupuid = su1.uid
This query...
May 17, 2013 at 1:35 am
GilaMonster (5/13/2013)
sqlnaive (5/13/2013)
May 17, 2013 at 1:11 am
kevaburg (5/16/2013)
arooj300I have a database whose size is almost 25 GB, there log size 18 GB and mdf file is 6.30 GB, and everyday millions of records is coming and...
May 17, 2013 at 1:05 am
Great great question. Never used Columnstore index but theoretically knew the only fact that all columns in the clustering key must be present in the nonclustered columnstore index. So picked...
May 16, 2013 at 2:26 am
You can use some other buttons like [Enter], [Tab] etc and format it as per your requirement. Here comes your creativity in picture. 🙂
May 15, 2013 at 6:57 am
arooz, could you confirm if it is log file or data file in question here ?
May 15, 2013 at 5:59 am
Well in that case, you can simply provide the columns while inserting as well:
insert into dbo.T(ColA, ColB) select 'xxx', 'yyy'
or
insert into dbo.T(ColB, ColA) select 'xxx', 'yyy'
depending on whether...
May 15, 2013 at 5:55 am
"=" is causing an issue.
You can use either of there:
declare @ValueA varchar(10)
set @ValueA = 'aaa'
insert into dbo.T select @ValueA, 'yyy'
GO
insert into dbo.T values ('xxx', 'yyy')
GO
insert into dbo.T select 'xxx', 'yyy'
May 15, 2013 at 5:39 am
Viewing 15 posts - 376 through 390 (of 728 total)