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

Parsing a text file to a sql table

$
0
0

Can you help me parse a txt file to a SQL table.

Here is the exact format of the txt file... with the no space between the FreqDiff:

#Time; SampleNum; SampleId; Moisture; Solids; Weight; Water; Amplitude; T2; FreqDiff17-06-2014 08:10:10; 2558; phy0307413; 49.5; 50.5; 217.0; 107.4; 1232.7; 2721.8; 12.8

I would like it to go into a SQL table which looks like this:

SAMPLENUM RESULTTIME                     SAMPLEID       MOISTURE SOLIDS RESULTWEIGHT WATER AMPLITUDE T2        FreqDiff
2558            17-06-2014 08:10:10       phy0307413    49.5           50.5     217.0                107.4   1232.7        2721.8 12.8

Having problems because the txt file is all on one line with not space between the last column called FreqDiff and the values I am unable to distinguish the Column Names from the Values.

thanks in advance for your help,

Phoebe



Viewing all articles
Browse latest Browse all 23857

Trending Articles



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