CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Location
    Colombia
    Posts
    15

    Query Database inverse

    Using a Data control after I have query a the database, how do I select the inverse records.

    By Inverse record I mean the recordes that where not included.

    Example:
    After querying for a city like= "chicago"
    I need to view in that data base the records that are not from chicago..

  2. #2
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569
    you'll need a new query on the DB.

    in the query, change all AND's to OR's, all OR's to AND's and then either
    - change all = to <> (and visa versa), all > to <= (and visa versa) and all < to >= (and visa versa).
    OR
    - place NOT in front of each comparitive operator.
    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured