[FWTools] using -sql with ogrinfo

Frank Warmerdam warmerdam at pobox.com
Tue May 22 12:34:34 EDT 2007

John Cole wrote:
> Hello,
>   I'm trying to select the number of records out of a tiger 2006se county
> using a -sql query with ogrinfo.
> I'm getting the following error:
> C:\mapserver\tiger2006se\AL\TGR01001>ogrinfo . -sql 'SELECT * FROM
> CompleteChain
> '
> ERROR 4: Tiger Driver doesn't support update.
> Had to open data source read-only.
> INFO: Open of `.'
>       using driver `TIGER' successful.
> layer names ignored in combination with -sql.
> ERROR 1: SQL: Missing FROM clause in SELECT statement.
> I'd like to get the number of roads out of the CompleteChain layer, so I
> assume my query would look like:
> SELECT COUNT(fid) FROM CompleteChain WHERE cfcc LIKE "A%" 
> but this too gets the above error.  


I *suspect* some sort of quoting issue at the windows commandline.  If you can
rule that out (perhaps by trying double quotes) then I'd encourage you to
file a bug report, and I'll have Mateusz dig into it.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

More information about the FWTools mailing list