Hi Paul,

remember that you cant compare somthing with NULL as the result is always 
false.

i just tried and found workable:

select area_id, 'is not null' from areas where geometry is not null
union
select area_id, 'is null' from areas where geometry is null;

(area_is is the unique id, geometry is the sdo_geometry field and areas in 
the table)
can probably be more elegant, but it works.

hth
christof

> -----Urspr�ngliche Nachricht-----
> Von:  CRISP, Paul -Syntegra UK [SMTP:[EMAIL PROTECTED]
> Gesendet am:  Dienstag, 4. M�rz 2003 11:46
> An:   'MapInfo-L (E-mail)
> Betreff:      MI-L Oracle spatial - query
>
> All
>
> I'm looking for a SQL statement which allows me to check whether a 
spatial
> object is null and return a string in line
>
> What I want to do is something like
>
> Select <unique id>, DECODE(geometry, null, "T", "F") from <my map table>
> where <other condition applies>.
>
> I can't get either DECODE or NVL to work. I CAN do a separate 
select/update
> to identify the null geometry but I've then got the overhead of a
> query/update and associated transaction.
>
> Any ideas?
>
> Will sum
>
> Paul Crisp
>
> Syntegra
> Innovation Place Delta Bank Road Newcastle NE11 9DJ
> Tel 0191 461 4522 Fax 0191 460 1987
>
>
>
>
> ********************************************************************
>
> This email may contain information which is privileged or confidential. 
If you are not the intended recipient of this email, please notify the 
sender immediately and delete it without reading, copying, storing, 
forwarding or disclosing its contents to any other person
> Thank you
>
> Check us out at http://www.syntegra.com
>
> ********************************************************************
>
>

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5772

Reply via email to