Hi All
 
I want a script that appends tables without knowing how many columns there are in the tables. Assume all tables ot be appended have the same number of columns.
 

Open table LayerList.[ProcessFolder] + + "\" * tablesToAppend.[SrcTable] + ".tab" As "base";

noColumns = TableInfo(base, TAB_INFO_NCOLS);  'get number of columns

While tablesToCopy.Read()

{

Open table LayerList.[ProcessFolder] + + "\" * tablesToAppend.[SrcTable] + ".tab" As "tabToAppend";

Insert Into base (COL1, COL2, COL3, .. noColumns) Select COL1, COL2, COL3, .. noColumns From tabToAppend;   ';use number of columns to construct an SQL statement

Close Table tabToAppend;

}

Commit Table  base As ..

Any idea how I would do this? Do I need to construct an Insert string and then run it in some way? Or can you INSERT without knowing the number of columns?
 
Ta
 
 
Simon Allen
Senior GIS Officer
 
[EMAIL PROTECTED]
 
South Gloucestershire Council
01454 863655 (direct)
01454 863855 (fax)
 
http://www.southglos.gov.uk
 
********************************************************************** This email and any files transmitted with it from South Gloucestershire Council are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the South Gloucestershire Council Postmaster at the address below. This footnote also confirms that this email message has been swept for the presence of computer viruses. [EMAIL PROTECTED] **********************************************************************
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to