In your prior message you indicated that the features selected are done
so without benefit of common attribute (or set of attributes) or spatial
condition that can be expressed as an algorithm (SQL phrase).  That is,
you selected them "manually" using your own heuristics not represented
by anything in the database.

In affect you, in your own mind, have created some "new" common binding
logic between these features.   

You are now left with two methods for retaining these groupings:
1) The quick and dirty method
2) Modifying your data structure (and data) to implement the selections.

1) The quick and dirty method (which you said you do not want to do, and
I can agree with for a number of reasons, but it does work) is to "Save"
the grouping as a collection in a file.  If you do create new tables
consider using the metadata capabilities to identify / manage the
information, or create your own file scheme to do the same.       
   a) Save the selection as a table, and deal with it.
   b) Save the selected identifiers, and possibly the geometry as a new
table (a table with only identifiers will do).  This only reduces the
amount of information redundantly stored.  You can always "bind" the
selection list back to the original list to gain access to the
attributes.  What you have done is implicitly created a new attribute.  


2) Modifying your data structure (and data) to implement the selections.
If the process is supposed to be repeatable by yourself or others then I
would suggest that you have a data problem.

It sounds like there is a missing attribute and/or spatial features
(layer) that would provide the criteria to select on, but you don't
have.  The solution is to create a new attribute (column in the tale)
that represents the value or logic that you want to select on.  Then the
selection can be saved / used as a SQL phrase (it may be more than one
attribute).

In terms of a process you can implement a simple or more thorough
solution to your problem. 

Simple method: (This may just be a temporary step until you can do
better) Modify your table structure, adding a new attribute that
represents your selection logic.  Make your selection as you have in the
past, and then insert (update) the new attribute you created with some
meaningful value.  From then on you can use an SQL phrase.

The thorough solution:
I would encourage you to go through a design process to determine the
data requirements: Business logic -> data flow -> data definition and
normalization exercise to determine what characteristics are needed for
your application.  You must be able to express you logic for selections
as an algorithm.

Don't forget that the algorithm you use for your selection can contain
both attribute conditions and spatial conditions.  It may be that you
don't have attributes in an existing data set, or a spatial dataset of
boundaries (or whatever) you need is not present.  

In either case you need to determine your data requirements and how you
can obtain or create them.  The solutions may be simple ones as
suggested above, or more complicated (involving new data collection).
The benefit of the design / specification process is to identify the
needs and document any decisions / trade-off that you make.

Guy Groves
GRG Consulting
6162 S. Annapurna Dr.
Evergreen, CO 80439
[EMAIL PROTECTED]



-----Original Message-----
From: Phillips, Frank [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 14, 2003 10:31 AM
To: 'MapInfo-L'
Subject: MI-L Convert Selection to SQL

Is there some way to "convert" a selection to SQL so that it can be
"saved"
in the Workspace?

Frank Phillips
Manager of Marketing GIS
Vulcan Materials Company (NYSE:VMC)
Birmingham, AL, USA

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


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

Reply via email to