Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Hide required SELECT output of table column

$
0
0

Hello, Guys

is it possible on SQL hide required SELECT output?

-- Query

SELECT OperatingSystem, Count(ComputerName) as Total FROM (
 SELECT replace(replace(REPLACE(REPLACE(Operating_System_Name_and0,'Microsoft Windows NT Workstation 6.1','Windows 7'),'Microsoft Windows NT Workstation 10.0','Windows 10'), 'Microsoft Windows NT Workstation 5.1','Windows XP'),'Windows 7 (Tablet Edition)','Windows 7 Embedded') as 'OperatingSystem',
 Netbios_Name0 as 'ComputerName'
 FROM v_R_System
) as OSCount
Group By OperatingSystem

--- Output

OperatingSystem Total
Microsoft Windows NT Server 6.2 1
Windows 7 27811
Windows 10 (Tablet Edition) 3
NULL 57
Windows 7 Embedded 1384
Windows 10 104
Microsoft Windows NT Server 6.3 333
Windows XP 1

For example i would like to cut outputs:  NULL 57, Microsoft Windows NT Server 6.2 1,Microsoft Windows NT Server 6.3 333

and result :

Windows 7 Embedded 1384
Windows 10 104

Windows 10 (Tablet Edition) 3

Windows XP 1

Is it simple command should i use?


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>