I want to know if there is any other way to load data from a text file other than using external tables.
Text file looks something like
101 fname1 lname1 D01..
102 fname2 lname2 D02..
I want to load it into a table with columns emp_id, fname, lname, dept etc.
Thanks!
As ceinmart suggested in comments you can do it from server side or from client side. From server side you can use DB-Access and
LOAD
command. From client side you can use any tool you like. For such tasks I often use Jython that can use Python string and CSV libraries as well as JDBC database drivers. With Jython you can usecsv
module to read data from file and PreparedStatement to insert it into database. In my other answer: Substring in Informix you will see such PreparedStatement.