Link to home
Start Free TrialLog in
Avatar of motioneye
motioneyeFlag for Singapore

asked on

Convert results from the query output to insert into sql table

Guys,
How do I convert a values below to the table with 3 columns with name,blocksize and Lable as column heder?

NULL
Name                                        BlockSize Label                    
----                                        --------- -----                    
C:\                                              4096 OS                      
E:\                                             65536                          
F:\                                             65536                          
G:\                                             65536                          
H:\                                             65536                          
\\?\Volume{1dc4d496-504...                       4096 WinRE                    
NULL
NULL
NULL
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

there are ways to go depends on your raw data.
but as a start, you can have a look on

Import Bulk Data by Using BULK INSERT or OPENROWSET(BULK...) (SQL Server)
https://docs.microsoft.com/en-us/sql/relational-databases/import-export/import-bulk-data-by-using-bulk-insert-or-openrowset-bulk-sql-server
Avatar of motioneye

ASKER

Hi,
Raw data above was stored as single column , so I want to split that into three column as per the header mentioned earlier.
ASKER CERTIFIED SOLUTION
Avatar of Zberteoc
Zberteoc
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial