This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.



To whom it may concern:

Currently I am in the process of writing a script to combine two separate
tables in MapInfo based on a matching value found in the ID field of both
tables (i.e. a join). I am trying to do all of this with variables that
represent the name of each table. The definition of each variable occurs
based on the user selection of the table. The problem arises when I try to
pass the name of the table with the ID field attached to it. All of this
information is stored in a new variable. When the select clause is executed,
the table names (again stored using variables) proceeds without a hitch. The
problem occurs at the where portion of the select clause. The error msg.
says that the tables are not joined. Therefore, I am wondering if I can
accomplish this join using variables pr not. If it is possible does anyone
know how I can do this. Below is the portion of the code where my error
occurs:

   dim layer17 as string
   
   layer17 = gsOutPath + trimmed17 + ".TAB"
   'note layer17
   open table layer17 interactive               'opens the layer 17 table
   open table outpath                                           'opens the
layer 61 table

   'trim the input files to remove the path and extension leaving only the
table name
   note trimmed17    'display the name of the layer 17 table

   dim layer61 as string
   layer61 = right$(outpath, 17)
   layer61 = left$(layer61, 13) 
   
   note layer61                 'display the name of the layer 61 table

  'combine the two tables using the ID field as a key - line 221
  dim id61, id17, sql as string
  id61 = layer61 + ".ID"
  id17 = trimmed17 + ".ID"
  note id61
  note id17

  select  from layer61, trimmed17 where id61 = id17 into Selection

The pgm. compiles correctly but does not execute the select statement. I
used right$ and left$ to remove the path and extension from the input file. 


David Windeler
GIS Technician 
City Of Vaughan

Engineering Department
2141 Major Mackenzie Drive
Vaughan, Ontario
L6A 1T1

Tel. (905) 832-8525 Ext. 8747
Fax (905) 832-6145
E-mail [EMAIL PROTECTED]



David Windeler
GIS Technician 
City Of Vaughan

Engineering Department
2141 Major Mackenzie Drive
Vaughan, Ontario
L6A 1T1

Tel. (905) 832-8525 Ext. 8747
Fax (905) 832-6145
E-mail [EMAIL PROTECTED]





_______________________________________________________________________
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