Re: Beginner SQL Query Question
- From: mattdaddym@xxxxxxxxx
- Date: Fri, 7 Nov 2008 08:50:14 -0800 (PST)
Thank you for your help, but there is a subtle difference in what I am
looking for.
First, there are no null values in this table. There are only entries
when there is a value. If a place in the GUI is blank, then nothing
gets entered into the UDF table.
Querying for places where udfnum <> 2 will not work either. Here is
why. Let's take an example of two separate entries from the GUI.
Entry 1) (my original example)
nameid - 12345 udfnum - 1 udftext - Green
nameid - 12345 udfnum - 2 udftext - Lord of the Rings
nameid - 12345 udfnum - 3 udftext - Cat in the Hat
Entry 2)
nameid - 6789udfnum - 1 udftext - Green
nameid - 6789udfnum - 2 udftext - Lord of the Rings
nameid - 6789udfnum - 3 udftext - Cat in the Hat
On Nov 6, 3:28 pm, Lord Kelvan <the_idd...@xxxxxxxxxxx> wrote:
as you trying to find all people that have a null value for the
favorite book or are you trying to find everyone who doesnt haev a
certian favorite book.
the not null one is easy
select nameid,name
from nametable,udftable
where udftext is null
if you want to find everyone who dosnt have a certian book use
select nameid,name
from nametable,udftable
where udfnum <> 2
hope this helps
Regards
Kelvan
.
- References:
- Beginner SQL Query Question
- From: mattdaddym
- Re: Beginner SQL Query Question
- From: Lord Kelvan
- Beginner SQL Query Question
- Prev by Date: RE: Comparing Dates
- Next by Date: Can I use a number variable in a Query?
- Previous by thread: Re: Beginner SQL Query Question
- Next by thread: Re: Beginner SQL Query Question
- Index(es):
Relevant Pages
|