You can't get rid of temporary columns on base tables unless you close the
base table.

What I do is to create a temporary query table and I add the column to the
query, not to the base table.  

In your example:
Select * from table1 into table2
Add Column "table2" LayerName (POP Float) From table1 Set To POP Where COL1
= COL1
Dynamic

Then, all you have to do is to close the query, or reissue the query
command, and that's all.  You now have a fresh query without the temporary
column. 


At 11:26 A.M. 28/11/2000 -0500, you wrote:
>Hi all,
>
>I am trying to update one temporary column. I am thinking, if I can delete
>that column and add new column, then I will get my job done.  However, what
>I found from the reference book is: alter table cannot be used on linked
>tables. I can't use Update Statement either, as I need to get the value from
>the linked tables and update statement doesn't seem to support that (if I
>miss that, please let me know.)
>
>This is the code I use to add the temp column:
>Add Column LayerName (POP Float)From table1 Set To POP Where COL1 = COL1
>Dynamic
>
>Here is what I am trying to do:
>
>for i = 1 to NumCols(LayerName)
>strCol = ColumnInfo(LayerName, "COL" + i, Col_Info_Name)
>if Instr(1, strCol, "POP" ) > 0 then
>lgCheck = Ask ("Do you want to overwrite the existing column?", "Yes", "No")
>if (lgCheck) then 
>Alter Table LayerName (Drop Pop)  '***THIS DOESN'T WORK
>else
>exit sub 
>end if
>end if
>next
>
>Any suggestions are highly appreciated!
>
>TIA,
>
>ShuHua
>
>
>_______________________________________________________________________
>List hosting provided by Directions Magazine | www.directionsmag.com |
>To unsubscribe, send e-mail to [EMAIL PROTECTED] and
>put "unsubscribe MapInfo-L" in the message body.
>
---------------------------------
     Ing. Juan Pufleau Correa
Geografía y Electrónica, SA de CV
      Aguascalientes, Mexico
---------------------------------


_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to