Quantcast
Channel: Getting started with SQL Server forum
Viewing all articles
Browse latest Browse all 9243

Split single row data into multiple columns depending upon length

$
0
0

Hi All,

how canwe split the data in one row to multiple columns in csv file to sql server. Data in the csv is not delimitted but know the size of each column.

ForExample: The data in CSV is like(two rows)

USACASANJOSE94086  91APPLE

UK WLCARDIF 74016    11GOLF

i have to load the above data into a table with columns

ColumnStart EndLengthExample
Country133USA
State452CA
City6127SANJOSE
ZIP1317594086
Available18181 
zone1920291
Item21255Apple
 



Viewing all articles
Browse latest Browse all 9243


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