[postgis-users] Mapserv Issues

David Blasby dblasby at refractions.net
Mon May 17 10:26:41 PDT 2004


Zamil Murji wrote:

> Thanks Dave
> 
> Either way produces the same error
> 
> msPOSTGISLayerGetItems(): Query error. Error executing POSTGIS  SQL   statement (in msPOSTGISLayerGetItems): SELECT * FROM (select
>  oid, to_date(main_well1.spud_date, 'YYYY-MM-DD') as pretty_spud_date, to_date(main_well1.rig_release_date, 'YYYY-MM-DD') as prett
> y_rig_release_date, * from main_well1) as new_table false LIMIT 0
> -ERROR:  parser: parse error at or near "false" at character 204



> sprintf(sql,"SELECT * FROM (%s) WHERE false LIMIT 0",table_name);
> or
> sprintf(sql,"SELECT * FROM %s WHERE false LIMIT 0",table_name);

                                 ^^^^^

Did you stick the "WHERE" part in the line - it isnt in the SQL query.

dave



More information about the postgis-users mailing list