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

SSIS import .csv

$
0
0

Hello,

I have a .csv file with structured data in it as follows:

TRANS NO, PRODUCT NO, PRODUCT NAME, QUANTITY, UNIT PRICE, EXT PRICE

TAX 1, TAX NAME, TAX VALUE, QUANTITY, TAX AMOUNT

TAX 2, TAX NAME, TAX VALUE, QUANTITY, TAX AMOUNT

TRANS NO, PRODUCT NO, PRODUCT NAME, QUANTITIY, UNIT PRICE, EXT PRICE

TAX 1, TAX NAME, TAX VALUE, QUANTITY, TAX AMOUNT

TAX 2, TAX NAME, TAX VALUE, QUANTITY, TAX AMOUNT

AND IT KEEPS REPEATING WITH DIFFERENT PRODUCTS .....

My issue is when I extract this data into SQL there is no connecting identifier BETWEEN the product and its 2 tax lines. i.e.

1221,001,Colored Shirt,10,19.99,199.9

GST,Good Service,0.1,10,19.99

PST, Province Tax, 0.5,10,9.9

1222,002,Black pants, 10, 40,400

GST,Good Service,0.1,10,40

PST, Province Tax, 0.5,10,20

I can take each line separately into the DB but unable to connect them without using the Quantity as the unique identifier.

Please help.

Thanks in advance.

RS


Viewing all articles
Browse latest Browse all 7129

Trending Articles



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