→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎07-01-2015 12:19 PM
Solved! Go to Solution.
‎07-02-2015 01:20 PM
Select Top 1000000 Cast(DatePart(Year, tblAssetCustom.Warrantydate) As nvarchar)
+ ' ' + 'Q' + Cast(DatePart(Quarter, tblAssetCustom.Warrantydate) As nvarchar)
As [warranty expiration],
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1
Order By tblAssetCustom.Warrantydate
‎09-17-2015 10:14 AM
‎07-22-2015 02:56 PM
Select Top 1000000 Case
When DatePart(Month, tblAssetCustom.Warrantydate) >= 10 Then
Cast(DatePart(Year, tblAssetCustom.Warrantydate) + 1 As nvarchar) + ' Q1'
When DatePart(Month, tblAssetCustom.Warrantydate) <
4 Then Cast(DatePart(Year, tblAssetCustom.Warrantydate) As nvarchar) + ' Q2'
When DatePart(Month, tblAssetCustom.Warrantydate) >= 4 And
DatePart(Month, tblAssetCustom.Warrantydate) < 7 Then Cast(DatePart(Year,
tblAssetCustom.Warrantydate) As nvarchar) + ' Q3'
When DatePart(Month, tblAssetCustom.Warrantydate) >= 7 And
DatePart(Month, tblAssetCustom.Warrantydate) < 10 Then Cast(DatePart(Year,
tblAssetCustom.Warrantydate) As nvarchar) + ' Q4'
End As [warranty expiration],
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1
Order By tblAssetCustom.Warrantydate
‎07-22-2015 10:05 AM
‎07-02-2015 01:20 PM
Select Top 1000000 Cast(DatePart(Year, tblAssetCustom.Warrantydate) As nvarchar)
+ ' ' + 'Q' + Cast(DatePart(Quarter, tblAssetCustom.Warrantydate) As nvarchar)
As [warranty expiration],
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1
Order By tblAssetCustom.Warrantydate
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now