dim a string
a = str$(1)
Regards
Uffe Kousgaard
--
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
SELECT col4, col6 FROM myTable
I don't know if it matters, but you should probably not use 'col' as a
variable. The number on the end of the 'col' alias is the index of the
field you want. The index starts at 1. Also these are literals, not
normal variables so you can't do anything like this:
SELECT "col" & 12 ... or SELECT "col12"... or even SELECT "col" +
Str$(12)... ; all these will fail miserably.
Instead, construct your query as a string and execute it with Run
Command. Here's a typical example.
Dim sCmd As String
Dim n As SmallInt
' Select the first 12 fields in thisTable and write them to mySelection
sCmd = "SELECT col1"
For n = 2 to 12
sCmd = sCmd + ", col" & n
Next
Run Command sCmd + " FROM thisTable INTO mySelection"
Hope that helps!
--
*Bill Thoen*
GISnet - www.gisnet.com
303-786-9961
----------------------------------
oo=== oooo= oooo === oo= o=o ooo oo =o o= =oo o=
=o== oo=== oooo= =ooo o o o=o ooo oo =o o= =o=o
o= ooo o
=o === = o= =o=o === oo =o =o=o oo =oo o =o =o=o o