Hello Sergi, MapInfo Pro's SQL implementation is somewhat limited, and one of the requirements when doing multi table queries is to give a simple INNER JOIN expression (e.g. A.ID = B.ID) as the first expression in the where clause. There are no LEFT/RIGHT/OUTER/CROSS joins possible, only INNER joins are supported.
A handy work-around to obtain an OUTER/CROSS join, is to add a dummy column in both tables with same type, leave the values to be default, and use that as an INNER join. Since all values are identical, the result will be an OUTER/CROSS join. After specifying the join clause, you can append your INSTR() expression. Best regards / Med venlig hilsen Lars V. Nielsen -------------------------------------------------------- Hvenegaard A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. +45 6313 5050 http://www.hvenegaard.dk ----- Original Message ----- From: "Gamiz Ribelles, Sergi (Regsa)" <[EMAIL PROTECTED]> To: "Mapinfo-list (E-mail)" <[email protected]> Sent: Thursday, March 02, 2006 10:44 AM Subject: [MI-L] joining through InStr() function Hi list, I'm in troubleshoting dealing with InStr function as follows 1) Select * from Table1, Table22 where InStr(1, Table2.names, Table1.name)>1 into Selection or 2) Select * from Table1 where InStr(1, any(select Table2.names from Table2), Table1.name)>1 into Selection (Table1 is mappable and Table2 doesn't) Both expressions cause errors. Why?. anyone can help me? Thaks very much in advance. Sergi Gàmiz Ribelles (627481954) REGS DE CATALUNYA S.A. (www.regsa.es) Unitat de Promoció de Regadius i Concentració Parcel·lària c/General Brito, 6, 5è 25007 Lleida tel. 973222838 fax 973222627 [EMAIL PROTECTED] _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
