sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
dschmidt@lexmark.com's Avatar

detecting a NULL box


Question posted by: dschmidt@lexmark.com (Guest) on November 11th, 2005 11:57 PM

Does anybody know how to detect a NULL in a geometric box type?

When I execute the following sql statement (coords is a box type)
autotest=# select coords from dlg_control limit 1
autotest-# \g
coords
--------

(1 row)

So, I have data that contains a "NULL" in the coords column, but when I
test on box(NULL) I don't get any data...
autotest=# select coords from dlg_control where coords=box(NULL) limit 1
autotest-# \g
coords
--------
(0 rows)

Any ideas?
Thanks,
Dennis





---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

1 Answer Posted
Guy Fraser's Avatar
Guest - n/a Posts
#2: Re: detecting a NULL box

I don't know why you want to list a NULL with no other info, but here
you go:

SELECT coords FROM dlg_control WHERE coords IS NULL LIMIT 1;

Join Bytes! wrote:
[color=blue]
>Does anybody know how to detect a NULL in a geometric box type?
>
>When I execute the following sql statement (coords is a box type)
>autotest=# select coords from dlg_control limit 1
>autotest-# \g
> coords
>--------
>
>(1 row)
>
>So, I have data that contains a "NULL" in the coords column, but when I
>test on box(NULL) I don't get any data...
>autotest=# select coords from dlg_control where coords=box(NULL) limit 1
>autotest-# \g
> coords
>--------
>(0 rows)
>
>Any ideas?
>Thanks,
>Dennis
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>
>
>[/color]

--
Guy Fraser
Network Administrator
The Internet Centre
780-450-6787 , 1-888-450-6787

There is a fine line between genius and lunacy, fear not, walk the
line with pride. Not all things will end up as you wanted, but you
will certainly discover things the meek and timid will miss out on.





---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

 
Not the answer you were looking for? Post your question . . .
196,837 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,837 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors