cancel
Showing results for 
Search instead for 
Did you mean: 

Import data from csv to SQL database

Former Member
0 Kudos

How to Import data from csv to SQL database through BLS-xMII?

Accepted Solutions (0)

Answers (1)

Answers (1)

jcgood25
Active Contributor
0 Kudos

If you are looking just to load data into the database I would recommend using native database mechanisms, otherwise you'll be looping through the dataset and doing the needed INSERT statements.

Former Member
0 Kudos

ya i tried with bulk insert command and its working fine. But i have to do it through BLS in xMII. that is i m nt getting how to do it?

Former Member
0 Kudos

Hi,

if you using Oracle, you may also use the bulk insert with MII. You can use the String List to XML parser to convert your CSV to XML, and then use a query that calls a stored procedure which does the bulk insert.

Also have a look at thread [read XML file into stored procedure|http://forums.sdn.sap.com/click.jspa?searchID=63850236&messageID=7455643].

Michael

Former Member
0 Kudos

Hi Michael,

I think there is another method rather than using stored procedure we can use repeater for row by row insertion . can u tell me how we can do that?

Former Member
0 Kudos

The StringListToXmlParser returns a result of form StringListToXmlParser.Output{Rowsets/Rowset/Row}. You can directly use it in a Repeater configuration. Retrieve the values from the repeater and fill the Parameters of a predefined query that you can call from the BLT. To insert the values, you can use a SQL query in Command mode.

Does this help?

Michael