Alterar dados da pesquisa
Prezados, bom dia.
Uma dúvida.
Possuo um script que controla insumos de impressora.
Select Top 1000000 *,
Case
When ([Trocar Toner].Restando <= 5) Then 'red'
End As foregroundcolor
From (Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetName As Hostname,
tblAssetCustom.Model As Modelo,
Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum *
100) As Restando,
tblCustDevPrinter.Tonername As Insumos,
tblAssetCustom.Location As Localizacao,
tblAssets.IPAddress,
tblAssets.Lastseen As [ultima visualizacao]
From tblCustDevPrinter
Inner Join tblAssets On tblCustDevPrinter.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On
tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Where tblAssets.AssetName Not Like '%ROS%' And tblAssets.AssetName
Not Like '%UCS%' And tblAssets.assetname Not Like 'HSPCED01P%' And
tsysIPLocations.iplocation = 'Hospital Centro' And tblAssetCustom.State =
1) As [Trocar Toner]
Where [Trocar Toner].Restando >= 0 And [Trocar Toner].Restando <= 10 And
Convert(date,[Trocar Toner].[ultima visualizacao]) = Convert(date,GetDate())
resultado de hoje :
Hostname Insumos
HSPCOL01P Black Image Drum Unit OKI DATA CORP
Existe a possbililidade de ciar alis para o resultado ?
Neste caso, toda vez que "INSUMOS" contiver Black Image Drum, o resultado será "Troca de Cilindro" por exemplo.
É possível ?
Uma dúvida.
Possuo um script que controla insumos de impressora.
Select Top 1000000 *,
Case
When ([Trocar Toner].Restando <= 5) Then 'red'
End As foregroundcolor
From (Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetName As Hostname,
tblAssetCustom.Model As Modelo,
Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum *
100) As Restando,
tblCustDevPrinter.Tonername As Insumos,
tblAssetCustom.Location As Localizacao,
tblAssets.IPAddress,
tblAssets.Lastseen As [ultima visualizacao]
From tblCustDevPrinter
Inner Join tblAssets On tblCustDevPrinter.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On
tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Where tblAssets.AssetName Not Like '%ROS%' And tblAssets.AssetName
Not Like '%UCS%' And tblAssets.assetname Not Like 'HSPCED01P%' And
tsysIPLocations.iplocation = 'Hospital Centro' And tblAssetCustom.State =
1) As [Trocar Toner]
Where [Trocar Toner].Restando >= 0 And [Trocar Toner].Restando <= 10 And
Convert(date,[Trocar Toner].[ultima visualizacao]) = Convert(date,GetDate())
resultado de hoje :
Hostname Insumos
HSPCOL01P Black Image Drum Unit OKI DATA CORP
Existe a possbililidade de ciar alis para o resultado ?
Neste caso, toda vez que "INSUMOS" contiver Black Image Drum, o resultado será "Troca de Cilindro" por exemplo.
É possível ?
Pedro Costa
Curtidas 0