[mapserver-users] Oracle Spatial layer has too many fields?
Josh Hevenor
jhevenor at rogers.com
Wed Dec 16 10:35:44 PST 2009
Thanks Alan,
I found the query in the log file and ran it through SqlDeveloper to see
the full query was valid. Nope! One of the new columns shared a name
with a reserved word.
For now I'll rename the column to play nice. But, if MapServer quoted
the field name list it built then this case should be covered...
select "f1", "f1", "GROUP" FROM (select * from someTable)...
Sorry to bug everyone with this,
Josh
Alan Boudreault wrote:
>
> Hi Josh,
>
> May you add the directive "debug 5" at the map and layer levels in
> your mapfile to see what sql query is executed. You may have to add
> the directive "CONFIG "MS_ERRORFILE" "/tmp/mapserver.log"" to redirect
> the logs in a file.
>
> Alan
>
> On December 16, 2009 12:21:26 pm Josh Hevenor wrote:
>
> > Error:
>
> >
>
> > I was adding new fields to an Oracle Spatial layer, now having 61 fields
>
> > defined with
>
> >
>
> > geom from (select * from spatialTable) using ...
>
> >
>
> > Process
>
> >
>
> > $layer->qryByRect
>
> > $layer->open
>
> > For()
>
> > $res=$layer->getResult
>
> > $shp=$res->getShape // Fails, line 637
>
> >
>
> > Error
>
> > Fatal error: [MapServer Error]: msOracleSpatialLayerGetShape():
>
> > Error: ORA-00936: missing expression
>
> > Query statement: SELECT field1, field2, field3,..., GEOM FROM
>
> > (select * from spatialTable in <b>C:\MSMap\genQuery.php</b> on line 637;
>
> >
>
> > I feel this query is getting cut off.
>
> > If I redefine the layer using some specific subset of fields my query
>
> > works again
>
> >
>
> > GEOM from (select field1, field2, ..., fieldX, geom from
>
> > spatialTable)... X < 61
>
> >
>
> > The code is old and has run solidly for a long time. The fields are
>
> > new. Is there a limit on the number of fields/query string length in
>
> > PHP mapscript? Any thoughts?
>
> >
>
> > Thanks in advance,
>
> >
>
> > Josh
>
> >
>
> >
>
> > _______________________________________________
>
> > mapserver-users mailing list
>
> > mapserver-users at lists.osgeo.org
>
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> >
>
> --
>
> Alan Boudreault
>
> Mapgears
>
> http://www.mapgears.com
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.427 / Virus Database: 270.14.110/2568 - Release Date: 12/16/09 08:02:00
>
>
More information about the MapServer-users
mailing list