Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filtering a database (FrontPage 2000)

    I'm working in FrontPage 2000 and am trying to create a search feature of a phone directory. I have created a database connection to a csv file called New_Phone_List and have followed the wizard to insert the database. Everything works fine but I need to filter the database by a field called "Headset" which contains "Y" and "N" records. I only want the user to be able to access phone numbers with a "Y" in the headset but I don't want it to require the user to enter it as a search parameter. In other words,I want that to happen in the background. Here is the code that I currently have. The form allows them to search on Name or Department (Cable). Thanks.
    SELECT * FROM New_Phone_List.csv WHERE (Name LIKE '%::Name::%' OR Cable LIKE '%::Cable::%' AND Headset = '"Y"')

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Filtering a database (FrontPage 2000)

    Off the top of my head, perhaps you need some parentheses to group the first set of conditions together:

    <code>SELECT * FROM New_Phone_List.csv WHERE ((Name LIKE '%::Name::%' OR Cable LIKE '%::Cable::%') AND Headset = '"Y"') </code>

  3. #3
    New Lounger
    Join Date
    Nov 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtering a database (FrontPage 2000)

    I had tried that and it didn't seem to make a difference.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Filtering a database (FrontPage 2000)

    Try

    SELECT * FROM New_Phone_List.csv WHERE (Name LIKE '%::Name::%' AND Headset = 'Y') OR (Cable LIKE '%::Cable::%' AND Headset = '"Y"')
    Jerry

Posting Permissions

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