Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 12890

Split the result of one column to multiple columns

$
0
0

Hi Experts,

Could you please help me to split the result of below query into multiple columns:

EXEC master..xp_cmdshell 'wmic service where "Caption Like ''%sql%''" get Caption , StartName, state'

I needs result of this query something like below but in tabular format:

CaptionStartNameState
SQL Server Integration Services 11.0NT Service\MsDtsServer110Running
SQL Full-text Filter Daemon Launcher (MSSQLSERVER)NT Service\MSSQLFDLauncherRunning
SQL Server (MSSQLSERVER)NT Service\MSSQLSERVERRunning
SQL Server Analysis Services (MSSQLSERVER)NT Service\MSSQLServerOLAPServiceRunning

--------------------------------- Devender Bijania


Viewing all articles
Browse latest Browse all 12890

Trending Articles



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