[Mapserver-users] OGR Layer with SQL
Blaine Hackett
blaine_hack1 at yahoo.com
Thu Jul 29 11:44:12 PDT 2004
Thanks Frank. I will do that. One other thing. I am
trying to send variables via the url so that people
can input a date range from the webpage.
So, I am not using an .ovf file. I have the OGR
connection syntax in the map file(I have that working
by the way).
The question is, would that make any difference?
Thanks again
Blaine
--- Frank Warmerdam <warmerdam at pobox.com> wrote:
> Blaine Hackett wrote:
> > Frank
> >
> > That worked great! Thanks!
> >
> > Now, however, I need to find out how to do this
> with a
> > date/time field.
> >
> > I tried using the same syntax but with the time:
> > <SrcSQL>SELECT * FROM subset WHERE(tim_time >
> > '7:00:00 AM') AND (tim_time < '7:30:00
> > AM')</SrcSQL>
> > but that threw me the "Open Failed" error. There
> must
> > be someplace that discusses how you might format
> SQL
> > for time/date field but I can't find anything.
> >
> > Got any ideas?
>
> Blaine,
>
> Hmm, it is odd that it would report "open failed".
> Perhaps this is what
> the VRT driver does if the SrcSQL statement fails on
> the underlying datasource
> (aka the ODBC database).
>
> I don't know the correct syntax for the time
> comparisons. I would suggest
> experimenting with the SQL in a direct ODBC SQL
> client till you are getting
> the right sort of responses and then trying to embed
> it in a .ovf file.
>
> Good luck,
>
> --
>
---------------------------------------+--------------------------------------
> 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 | Geospatial
> Programmer for Rent
>
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
More information about the MapServer-users
mailing list