Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Posts
    8

    Unanswered: Can anyone suggest whey I dont get any results with this search?

    Can anyone suggest whey I dont get any results with this search?

    SQL reads:

    SELECT SupplierName, Location, ShortDescription
    FROM Query1
    WHERE 'TimberSpecies' LIKE '%MMColParam%' AND 'CategoryTable' LIKE '%MMColParam2%' AND 'Location' LIKE '%MMColParam3%'

    MMColParam 1 Request.Form("keywordSearch")
    MMColParam2 2 Request.Form("location")
    MMColParam3 3 Request.Form("category")

    Mally.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you have WHERE 'TimberSpecies' LIKE

    'TimberSpecies' is a string

    you probably want to try WHERE TimberSpecies LIKE

    TimberSpecies is a column
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    for the latest on this, please see http://www.dbforums.com/t1205123.html
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Dec 2005
    Posts
    8

    Re: SQL Help

    I understand what you are saying there but when i do as mentioned.

    SELECT SupplierName, Location, ShortDescription
    FROM Query1
    WHERE TimberSpecies LIKE '%MMColParam%' AND CategoryTable LIKE '%MMColParam2%' AND Location LIKE '%MMColParam3%'

    I get the following error when testing the SQL

    [Microsoft][OBDC Microsoft Access Driver] Too few paramaters. Expected 1.

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    test your query in access first, before testing it via dreamweaver

    also, if it's access, you'll want to try asterisks instead of percent signs as the wildcard characters

    what's Query1? does it return those five columns? is CategoryTable actually a column?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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