[Mapserver-users] OGR Layer with SQL

Blaine Hackett blaine_hack1 at yahoo.com
Wed Jul 28 10:08:17 PDT 2004


All

I am having a problem using SQL with OGR.  The
following SQL statement works:
<SrcSQL>SELECT * FROM subset (time > '6:00:00 AM'
</SrcSQL>

but if I make it complex like this:
<SrcSQL>SELECT * FROM subset (time > '6:00:00 AM') AND
(time < '7:30:00 AM')  </SrcSQL>

It throws this error:
msOGRFileOpen(): OGR error. Open failed for OGR
connection ` ODBC:ODBC:user/pass at minnesotadata SELECT
* FROM subset (time > '6:00:00 AM') AND (time <
'7:30:00 AM') wkbPoint WGS84 '. File not found or
unsupported format. 

The SQL syntax I am using is exactly like the syntax
shown on
http://www.remotesensing.org/gdal/ogr/ogr_sql.html.

I have tried every combination of quotes and
parenthesis and uppercase and lowercase without
success. I have also tried copying and pasting from
the Access SQL window since that is the database I am
linking to but that does not work at all. 

Anyone have any ideas what I am doing wrong?

Blaine


		
__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com



More information about the MapServer-users mailing list