[AccessD] Union Query WHERE Bug?

StaRKeY StaRKeY at Wanadoo.nl
Sat Apr 19 02:06:53 CDT 2003


MessageIf it contains chars and you are sure the value is all you need then
you could also try the following:
....WHERE Val(RepNum) = 8222

If that also doesn't work I'd like to see your data and query(s) myself:-)

Regards,
Eric S.

  -----Original Message-----
  From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Myke Myers
  Sent: zaterdag 19 april 2003 06:22
  To: accessd at databaseadvisors.com
  Subject: RE: [AccessD] Union Query WHERE Bug?


  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/f722e27e/attachment-0001.html>


More information about the AccessD mailing list