Import CSV file from string session.
vector ('csv-delimiter', self.delim, 'csv-quote', self.quot)
If table is not suitable in respect of number of columns or type of columns error will be signaled.
SQL>create procedure my_csv_load (in file_name varchar) { declare tb_name varchar; declare sess any; declare ar any; sess := file_open(file_name); -- to get the name of the table ar := csv_table_def(file_name); ar := split_and_decode(ar, 0,'\0\0 '); tb_name := trim (ar[2], '"'); dbg_obj_print(tb_name); -- to create the table exec(csv_table_def(file_name)); -- loading the data csv_load(sess,0, null, concat('DB.DBA.', tb_name)); } ; Done. -- 10 msec. SQL>select my_csv_load('tmp/MyContacts.csv'); callret VARCHAR _____________________ 0 1 Rows. -- 121 msec. SQL>select * from DB.DBA.tmp_MyContacts_csv; First_Name_Last_Name_Middle_Name_Name_Nickname_E_mail_Addre VARCHAR _______________________________________________________________________________ First Name;Last Name;Middle Name;Name;Nickname;E-mail Address;Home Street;Home City;Home Postal Code;Home State;Home Country/Region;Home Phone;Home Fa x;Mobile Phone;Personal Web Page;Business Street;Business City;Business Postal Code;Business State;Business Country/Region;Business Web Page;Business Phone;Business Fax;Pager;Company;Job Title;Department;Office Location;Notes ;;; Virtuoso Nightly Builds on oplusaix2 ;;virtuoso-nightly-builds@openlinksw.com;;;;;;;;;;;;;;;;;;;;;;; ...... 202 Rows. -- 341 msec.