Drop column by column number in MapBasic?

283 views
Skip to first unread message

Alan Carr

unread,
Mar 28, 2013, 7:16:01 AM3/28/13
to mapi...@googlegroups.com
Hi guys,

I'm trying to get MapBasic to drop COL13, it's probably a really obvious answer:

Alter Table "Gully_Group0" & gNum (Drop COL13)

MapInfo seems to be looking for a column named COL13 in this case, how do I make it so I don't have to use the column name?


Thanks,
Alan

Thomas Bacon

unread,
Mar 28, 2013, 7:20:10 AM3/28/13
to mapi...@googlegroups.com

Alan,

 

You can get the column name using the ColumnInfo function:

 

sColName = ColumnInfo(Gully_Group0, “COL13”, COL_INFO_NAME)

 

HTH,

 

Tom Bacon

GIS Engineer, Mouchel

T 01444 472380 │ E thomas...@mouchel.com W www.mouchel.com

Our values: innovation │ excellence │ integrity │ responsibility

--
--
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/groups/opt_out.
 
 



Mouchel logo

Mouchel Limited (Mouchel) is registered in England and Wales with registered number 01686040 at Export House, Cawsey Way, Woking, Surrey, UK, GU21 6QX.  The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. Any views or opinions expressed in this e-mail may be solely those of the author and are not necessarily those of Mouchel. No contracts may be concluded on behalf of Mouchel by means of email communications. Mouchel reserves the right to monitor and intercept emails sent and received on our network. 

Alan Carr

unread,
Mar 28, 2013, 7:49:46 AM3/28/13
to mapi...@googlegroups.com
Thanks, just out of curiosity, how come COL13 works in my other lines such as:

Add Column "Gully_Group0" & gNum (COL4)
From "Gully_Group0" & gNum & "_Processing"
Set To COL4 where COL13 = COL13

But not this one?

Thomas Bacon

unread,
Mar 28, 2013, 7:52:50 AM3/28/13
to mapi...@googlegroups.com

I’m not sure tbh. Could just be one of those quirks of MapBasic!

 

Tom Bacon

GIS Engineer, Mouchel

T 01444 472380 │ E thomas...@mouchel.com W www.mouchel.com

Our values: innovation │ excellence │ integrity │ responsibility

 

--

--
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/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages