Select * from Landuse where CATEGORY=”MIXED” into TT2
.. would read in MB code as the following.
Select * from Landuse where XX into TT2
Hi Jamie,
You are nearly there. You need to build up the sql command as a string and then execute the string with run command. At the moment, MapInfo would interpret your sql as:
Select * from Landuse where "CATEGORY=""MIXED""" into TT2
This is interpreted by MapInfo as being true for all records. I’m not entirely sure why, but I assume it is because you are not comparing a field to anything but simply inserting a string into the where condition.
By building up the command as a string first, you can avoid this problem. This method essentially ‘hard-codes’ the string from XX into the command string which you can then run using the Run Command statement:
Dim sCmd as String
sCmd = "Select * from Landuse where " & XX & " Into TT2"
Run Command sCmd
Hope this helps,
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 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. |