‎07-03-2013 08:24 PM
Solved! Go to Solution.
‎07-05-2013 11:28 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblFloppy.InterfaceType,
tblFloppy.Model,
tblFloppy.Name,
tblFloppy.Partitions,
Case
When tblFloppy.Size > 1099511627776 Then Cast(Ceiling(tblFloppy.Size /
1099511627776) As nVarChar(50)) + ' TB' Else Case
When tblFloppy.Size > 1073741824 Then Cast(Ceiling(tblFloppy.Size /
1073741824) As nVarChar(50)) + ' GB' Else Case
When tblFloppy.Size > 1048576 Then Cast(Ceiling(tblFloppy.Size /
1048576) As nVarChar(50)) + ' MB' Else Case
When tblFloppy.Size > 1024 Then Cast(Ceiling(tblFloppy.Size /
1024) As nVarChar(50)) + ' KB'
Else Cast(Ceiling(tblFloppy.Size) As nVarChar(50)) + ' B' End End End
End As Capacity,
tblFloppy.Lastchanged
From tblAssets
Inner Join tblFloppy On tblFloppy.AssetID = tblAssets.AssetID
Order By tblAssets.AssetUnique,
tblFloppy.Name
‎07-08-2013 02:29 PM
‎07-05-2013 10:12 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblFloppy.InterfaceType,
tblFloppy.Model,
tblFloppy.Name,
tblFloppy.Partitions,
Case
When tblFloppy.Size > 1099511627776 Then Ceiling(tblFloppy.Size /
1099511627776) Else Case
When tblFloppy.Size > 1073741824 Then Ceiling(tblFloppy.Size / 1073741824)
Else Case
When tblFloppy.Size > 1048576 Then Ceiling(tblFloppy.Size / 1048576)
Else Case When tblFloppy.Size > 1024 Then Ceiling(tblFloppy.Size / 1024)
Else Ceiling(tblFloppy.Size) End End End End As Capacity,
Case When tblFloppy.Size > 1099511627776 Then 'TB' Else Case
When tblFloppy.Size > 1073741824 Then 'GB' Else Case
When tblFloppy.Size > 1048576 Then 'MB' Else Case
When tblFloppy.Size > 1024 Then 'KB' Else Case
When IsNull(tblFloppy.Size, 0) <> 0 Then 'B' Else Null End End End
End End As Unit,
tblFloppy.Lastchanged
From tblAssets
Inner Join tblFloppy On tblFloppy.AssetID = tblAssets.AssetID
Order By tblAssets.AssetUnique,
tblFloppy.Name
‎07-05-2013 11:28 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblFloppy.InterfaceType,
tblFloppy.Model,
tblFloppy.Name,
tblFloppy.Partitions,
Case
When tblFloppy.Size > 1099511627776 Then Cast(Ceiling(tblFloppy.Size /
1099511627776) As nVarChar(50)) + ' TB' Else Case
When tblFloppy.Size > 1073741824 Then Cast(Ceiling(tblFloppy.Size /
1073741824) As nVarChar(50)) + ' GB' Else Case
When tblFloppy.Size > 1048576 Then Cast(Ceiling(tblFloppy.Size /
1048576) As nVarChar(50)) + ' MB' Else Case
When tblFloppy.Size > 1024 Then Cast(Ceiling(tblFloppy.Size /
1024) As nVarChar(50)) + ' KB'
Else Cast(Ceiling(tblFloppy.Size) As nVarChar(50)) + ' B' End End End
End As Capacity,
tblFloppy.Lastchanged
From tblAssets
Inner Join tblFloppy On tblFloppy.AssetID = tblAssets.AssetID
Order By tblAssets.AssetUnique,
tblFloppy.Name
‎07-05-2013 01:49 AM
‎07-03-2013 09:17 PM
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetUnique,
tblFloppy.InterfaceType,
tblFloppy.Model,
tblFloppy.Name,
tblFloppy.Partitions,
Ceiling(tblFloppy.Size / 1000 / 1000 / 1000) As [Capacity (GB)],
tblFloppy.Lastchanged
From
tblAssets
Inner Join tblFloppy On tblFloppy.AssetID = tblAssets.AssetID
Order By
tblAssets.AssetUnique,
tblFloppy.Name
‎07-04-2013 09:08 PM
RC62N wrote:
A drive's serial number is not stored in the drive details table (tblFloppy).
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now