The following example shows how to import information from myfile.ixf to the STAFF table:
db2 import from myfile.ixf of ixf messages msg.txt insert into staff
SQL3150N The H record in the PC/IXF file has product "DB2 01.00", date "19970220", and time "140848". SQL3153N The T record in the PC/IXF file has name "myfile", qualifier " ", and source " ". SQL3109N The utility is beginning to load data from file "myfile". SQL3110N The utility has completed processing. "58" rows were read from the input file. SQL3221W ...Begin COMMIT WORK. Input Record Count = "58". SQL3222W ...COMMIT of any database changes was successful. SQL3149N "58" rows were processed from the input file. "58" rows were successfully inserted into the table. "0" rows were rejected. |
The following example shows how to import the table MOVIETABLE from the input file delfile1, which has data in the DEL format:
db2 import from delfile1 of del modified by dldel| insert into movietable (actorname, description, url_making_of, url_movie) datalink specification (dl_url_default_prefix "http://narang"), (dl_url_replace_prefix "http://bomdel" dl_url_suffix ".mpeg")
Notes:
actorname VARCHAR(n) description VARCHAR(m) url_making_of DATALINK (with LINKTYPE URL) url_movie DATALINK (with LINKTYPE URL)
See API Examples.