Filter layer with MS/SQL based attribute ? b=SMftptmlbsr0DT00M4m7daF/51hDTSm35WHy/94yZIRDphDM0FPGm2tkV1LmtdgbMd5Vk1cBJixCTDeM2f2H/VzIAA9atB3PtyMnroddAltBA7JFses2z3tneVcXv7BSmrrfwOvY116jp4A09d2p0c6uc3Z20p/gGI39T b=IWJCkvYh35

Frank Warmerdam fwarmerdam at GMAIL.COM
Thu Aug 25 08:21:55 PDT 2005


On 8/25/05, Lars V. Nielsen (Hvenegaard) <LVN at hvenegaard.dk> wrote:
> Hi Frank,
> 
> My point about the left join was that a failed lookup didn't remove the
> feature, it just added (random/null/arbitrary) values. I was looking for it
> to filter. It's not a bug as I see it, just a clarification of it's purpose.
> However, I do see some random values being added, that may be a bug.

Lars,

Ah right.  This is by design, so no point in filing a bug.  I realize it isn't
necessarily correct according to the SQL spec.  

Um, well if you do see random values that sounds like a bug and is
worth a bug if you think you can provide a demonstration case I can
reproduce fairly easily.
 
> The non A-Z character I was referring to was not digits but Danish
> characters (æøåÆØÅ). I.e. ascii values from the 128-255 range. They're valid
> in MS/SQL, but apparently the OGR SQL parser doesn't support them.

Ah, that makes sense.  Indeed now that I think about it my OGR SQL tokenizer
is far to restrictive.  If you file a bug against OGR about this, I
will fix it.

> You didn't comment on this item: does the OGR SQL Parser support views and
> not just tables ? It seems to report "not found" whenever I try to enter a
> view instead of a table.

The OGR SQL allows table-like access to anything already identified by the
underlying OGR driver as a layer.  If "ogrinfo" doesn't see it as a layer, then
it won't be accessable from OGR SQL. 

So the question might instead be does the OGR ODBC driver show treat
views as tables.  I'm afraid I am not sure of the answer to this. I
think I tried
list to views as well, but I am pretty sure that you can operate on views if
you list the view name in the "table list" in the connection string.  

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    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list