Hi

Thanks for replying.

The easiest way I found is to use Workbench with only your spatial 
table, then save as mapping file (.fme) and then edit this mapping 
file.

In the mapping file, just before the definition of your spatial 
table, put these lines :

#********************************
MACRO SQL_Query  \
    SELECT * FROM MY_SPATIAL_TABLE, TABLE_A, TABLE_B \
    WHERE TABLE_SPATIAL.ID = TABLE_A.ID AND \
    TABLE_A.ID = TABLE_B.ID \
    WHERE TABLE_B.SOMETHING = "something"    

ORACLE8I_DEF MY_TABLE_NAME oracle_sql "$(SQL_Query)"  oracle_dim 2
#********************************

You have to add fields in your input and output table definition

If you have identical field's name in different table, you can use 
alias in your SQL query :

SELECT MY_SPATIAL_TABLE.ID MY_SPATIAL_TABLE_ID, TABLE_A.ID 
TABLE_A_ID...


Charles

--- In [email protected], "peter laulund" <[EMAIL PROTECTED]> 
wrote:
>
> Hi
> 
> Dont use the WB but write a mapping file in stead, her you can 
defien a 
> oracle table as select complety avoiding the spatial query, join 
many 
> tables, or write any sql you want, I also think you could execute 
a pl/sql 
> progam via the BEGIN_SQL syntax but I have not tested this.
> 
> To Michael, there is a special oracel tcl package - oratcl. I use 
this to 
> acces oracle rather than the odbc package, this I use to get data 
ind and 
> out off access, dbf etc.
> 
> Peter Laulund
> National Survey and Cadastre, Denmark
> 
> 
> >From: Michael Habarta <[EMAIL PROTECTED]>
> >Reply-To: [email protected]
> >To: [email protected]
> >Subject: Re: [fme] Sql select query
> >Date: Thu, 17 Nov 2005 23:51:04 +0100
> >
> >Hallo
> >
> >I tried a bit SQL querying on Oracle but found SQLExecutor too 
limited.
> >Coming from a traditional procedural programming environment, I 
still
> >have a hard time to get things done as I was used to. Feel like
> >handicapped ...
> >
> >What I did then, was to write a transformer using TCL and 
accessing
> >ORACLE directly over ODBC connection. In that way I could do more
> >on SQL level.
> >
> >It is quite useful for specialized tasks, but not very 
flexible ...
> >and in many ways not really fitting to the FME philosophy ...
> >
> >Recently I need to access ArcSDE versioned tables and tried
> >ArcSDEQuerier which gives even more headache ...
> >
> >So I am searching in this area too ...
> >
> >Michael
> >
> >
> >intelecgeomatic wrote:
> > > Hi,
> > >
> > > I use FME Workbench and I would like to extract geospatial 
data from
> > > Oracle9i according to a nonspatial query.
> > >
> > > I have one spatial table and some non spatial tables, all 
related to
> > > each others. I would like to use a select query on many non 
spatial
> > > tables to extract a subset of my spatial table.
> > >
> > > I tryed something with SQLExecutor but it takes too much time 
to
> > > process.
> > >
> > > Any ideas ?
> > >
> > > Thanks
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Get the maximum benefit from your FME, FME Objects, or 
SpatialDirect via 
> >our Professional Services team.  Visit www.safe.com/services for 
details.
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >--
> >       //   \\   Michael Habarta: Munich/Bavaria/Germany
> >      //     \\    Mail office: <mailto:[EMAIL PROTECTED]>
> >     //=======\\     Mail priv: <mailto:[EMAIL PROTECTED]>
> >    // \/|   | \\     Homepage: 
<http://people.freenet.de/mhabarta>
> >   //    |   |  \\       Motto: Romans 8:28
> >
> >
> >
> >
> >Get the maximum benefit from your FME, FME Objects, or 
SpatialDirect via 
> >our Professional Services team.  Visit www.safe.com/services for 
details.
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> 
> _________________________________________________________________
> Del din verden med MSN Spaces http://spaces.msn.com
>








Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our 
Professional Services team.  Visit www.safe.com/services for details. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to