Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Export/Import statement

Status
Not open for further replies.

glenpark

Programmer
Oct 6, 2006
21
US
I did a little searching but didn't find exactly what I was looking for.

Would there be a problem with doing an EXPORT of data from a table into a flat file, adding a column to the table, then executing an IMPORT into that table? Assuming that new column is non-nullible and carries a default value setting, how would the import statement look?
Code:
EXPORT TO myfile.ixf OF ixf SELECT * FROM MYTABLE;
IMPORT FROM myfile.ixf OF ixf INSERT INTO MYTABLE (col1, col2, col3) VALUES ?
Any help is appreciated.

Thanks,
Glen
 

You could EXPORT the null column:
Code:
EXPORT TO myfile.ixf
       OF ixf SELECT MYTABLE.*, NULL as NewCOL
                FROM MYTABLE
[3eyes]



----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top