Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Please share your ideas to insert data into oracle databse from csv file using QV script.
BR,
Chinna
HI,
Try like this
//Connection Sring
ODBC Connect to trDatabase;
//Load Data from Excel file
TABLE:
LOAD transaction_date,
location,
item,
site
FROM
[Data.xlsx]
(ooxml, embedded labels, table is Sheet1);
// Getting number of records in Table
LET V_ROWS = NoOfRows('TABLE');
// Loop through the records and insert into Database table
FOR V_ROW = 0 TO V_ROWS - 1
LET V_FIELD1 = Peek('transaction_date',V_ROW);
LET V_FIELD2 = Peek('location',V_ROW);
LET V_FIELD3 = Peek('item',V_ROW);
LET V_FIELD4 = Peek('site',V_ROW);
SQL INSERT INTO dbo.temp_Table(transaction_date, location,item, site) VALUES('$(V_FIELD1)','$(V_FIELD2)', '$(V_FIELD3)','$(V_FIELD4)');
NEXT;
Regards,
Jagan.
might be below thread help you :
Hi Chinna,
If you got the Answer please close this thread by giving Correct Answer.
Regards,
Jagan.
Hi Jagan,
I will test and mark accordingly.
Best Regards,
Chinna