[AccessD] Union Query WHERE Bug?

Myke Myers mmmtbig at bellsouth.net
Fri Apr 18 23:21:36 CDT 2003


I trimmed the RepNum field in both the Select queries used in the Union
query.
 
I can 'Filter By Selection' in either of the Select queries. But when I
try the same 'Filter By Selection' in the Union query, it returns no
records.
 
I found others with the same trouble in Google Groups. (Seached on
'Filter By Selection'  and 'union query'.) Very strange.
 
Susan and Jim: Thanks for your suggestions.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
(AccessD)
Sent: Friday, April 18, 2003 10:05 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Union Query WHERE Bug?


Hi Myke:
 
The only reason is because the field with the number string has a space
or another invisible character in the field.
the 'like' operand will return any string with '8222' any where in it.
If the field was five characters in size it could return three
possiblities of '8222 ' or ' 8222' or '8222'.
WHERE (((quniCEIncompleteCredits.RepNum) Like "8222")); 
 
you could try, to remove spaces:

WHERE (((trim(quniCEIncompleteCredits.RepNum))="8222")); 
 
HTH
JIm

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Myke Myers
Sent: Friday, April 18, 2003 12:53 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Union Query WHERE Bug?


Can anyone explain why this query returns one record, as it should...
 
SELECT quniCEIncompleteCredits.*
FROM quniCEIncompleteCredits
WHERE (((quniCEIncompleteCredits.RepNum) Like "8222")); 
 
And this query returns no records?. 
 
SELECT quniCEIncompleteCredits.*
FROM quniCEIncompleteCredits
WHERE (((quniCEIncompleteCredits.RepNum)="8222")); 
 
 
Using Access 2000. 'quniCEIncompleteCredits' is a union query.
 
TIA,
 
Myke
The Better Information Group


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030419/55d6f3bd/attachment-0001.html>


More information about the AccessD mailing list