Harry Coenen
pharryecoenen at btinternet.com
Tue Apr 20 20:58:20 CDT 2004
I guess this is it:
WHERE
( '<<=============================bracket added
TG_qryTimeBlockReview.BlockID
NOT IN
(
SELECT BlockID
FROM TG_InvoiceLine
)
) '<<=============================bracket added
AND
(
(
(TG_qryTimeBlockReview.[Date])
Between
#" & StartDate & "#
And
#" & EndDate & "#
)
)
;
"
>
>-C-
>
>---- Original Message ----
>From: stuart at lexacorp.com.pg
>To: accessd at databaseadvisors.com,
>Subject: Re: [AccessD] Query fails when using NOT IN ???
>Date: Wed, 21 Apr 2004 11:19:14 +1000
>
>>On 20 Apr 2004 at 19:00, Christopher Hawkins wrote:
>>
>>> All,
>>>
>>> This is weird. I have a query that is supposed to return all
>>records
>>> from a Time Entry table where the Entry ID is not in the Line Item
>>> table.
>>>
>>> So basically, it's "SELECT [field list here] FROM TimeEntry WHERE
>>> EntryID NOT IN (SELECT EntryID FROM LineItem)".
>>>
>>> Pretty simple, right? I can verify that there are a ton of records
>>> in TimeEntry that have no corresponding record in LineItem. But
>>when
>>> I run the query above, it returns no records.
>>>
>>
>>Is EntryID the same datatype in both tables?
>>
>>As another thought, make sure that you haven't "quoted" the subquery
>>in your actual code..
>>
>>Maybe pasting the actual code would help.
>>
>>
>>
>>
>>
>>
>>
>>--
>>Lexacorp Ltd
>>http://www.lexacorp.com.pg
>>Information Technology Consultancy, Software Development,System
>>Support.
>>
>>
>>
>>--
>>_______________________________________________
>>AccessD mailing list
>>AccessD at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/accessd
>>Website: http://www.databaseadvisors.com
>>
>
>
>--
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>