Sample code to update database needed
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Help! I have a need to check an ascii input file against several tables, if the entries are not in the tables, I need to insert them, then move on to the next (fixed length) record in the ascii table. I am using ESQL/C version 7.11, SE 7.11, and I-SQL 6.02 on a sparc station 2 running solaris 2.5. Basically, a simplified version of the database is like this: Table_a code char(5); value char(25); Table_b code char(5); value char(25); Main_Table a_code char(5) references table_a.code; b_code char(5) references table_b.code; mainvalue1 ... mainvalue2 ... etc. I want to insert values from teh ascii tables only if they do not already exist in table_a or table_b respectfully, and to always insert into the main_table all the values. Can anyone send me some sample code to do this? Thanks!! Dave David Wagle -- dave@aries.uthscsa.edu finger me for more info /\\~~~/\\ > < > ^ ^ < "For God so loved the world that he gave us samoyeds." > (_o_) < U