Someone who knows more than I about SQL might have a way of specifying *
from one table only.  Absent that, I have a workaround for you.

I'm assuming that you're using two tables because of the need to use one of
them to help select records -- e.g. selecting records where the FIPS code in
Table1 matches FIPS codes selected from Table2, but you don't want all of
the columns from table 2.  The trick is as follows:  Instead of:

Select * from Table1 t1, Table2 t2
        where t1.FIPS = t2.FIPS
        and t2.somecol like 'abc%'

Use

Select * from Table1
        where FIPS in 
         (Select FIPS from Table2 where somecol like 'abc%')

Another method:  If you needed a small number of columns from Table2 in your
final query result, you could do that by creating quick extract table, using
a Select into, and just getting the records & columns you need.

Fletcher James
President
Levit & James, Inc.
 
703-771-1549
[EMAIL PROTECTED]
www.levitjames.com

-----Original Message-----
From: Carlo Fazio [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 6:44 PM
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L SQL queries

When using the asterisk (*) symbol to select all records in an SQL query, is
it possible to select all columns from one table rather than both tables? I
know I can select columns individually but there are too many for selecting
individually. The dialogue box won't let me select all of them.
 
Carlo

                
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Helps protect you from nasty viruses.



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15090

Reply via email to