Thanks,
Rich
--
Richard Greenwood
richard....@gmail.com
www.greenwoodmap.com
Rich,
Luckily you are mistaken ;-)
Here is the syntax of the Update statement:
Syntax
Update table Set column = expr [, column = expr, ...]
[ Where RowID = idnum ]
Translated to english this means that you can add extra columns simply by dividing the columns with a comma.
Here is an example:
Update MYTABLE
Set ID = ROWID,
X = CentroidX(OBJ),
Y = CentroidY(OBJ)
HTH,
Peter Horsbøll Møller
GIS Developer, MTM GeoInformatics
Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail p...@cowi.dk
http://www.cowi.dk/gis
Rich
The menu option to update a column produces a statement like:
Add Column "Table1" (columnA) From table2
Set To columnA Where COL1 = COL1
But I can not expand on this to update multiple columns in a single
statement. Any suggestions?
--
Richard Greenwood
richard....@gmail.com
www.greenwoodmap.com
=============================
Select table1.columnA, table1.columnB,
table2.columnA "ColumnA2", table2.columnB "ColumnB2"
from table1, table2
where table1.id=table2.id
Into myjoin noselect
Set table table1 fastedit on
Update myjoin set columnA=columnA2, columnB=columnB2
Close table myjoin
Set table table1 fastedit off
You only have to do the column rename if both tables have columns involved
in the transfer with the same name. The fastedit stuff is optional, but
probably desirable.
Standard SQL DML would be a nice feature addition to MapInfo.
Hope this helps
________________________________
Spencer
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.