If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Can anyone suggest whey I dont get any results with this search?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-05, 05:36
malhyp malhyp is offline
Registered User
 
Join Date: Dec 2005
Posts: 8
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.
Reply With Quote
  #2 (permalink)  
Old 12-10-05, 06:35
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
you have WHERE 'TimberSpecies' LIKE

'TimberSpecies' is a string

you probably want to try WHERE TimberSpecies LIKE

TimberSpecies is a column
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 12-12-05, 13:19
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
for the latest on this, please see http://www.dbforums.com/t1205123.html
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #4 (permalink)  
Old 12-13-05, 05:22
malhyp malhyp is offline
Registered User
 
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.
Reply With Quote
  #5 (permalink)  
Old 12-13-05, 06:35
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On