Skip to main content
Known Participant
July 9, 2007
Question

Recordset

  • July 9, 2007
  • 1 reply
  • 523 views
Tring to create recordset from Query which is a keyword results page if i base the results page on one column of the table ie:

SELECT *
FROM Category
WHERE Supplier Like %MMColParam%

all works fine but if i want to add columns to search for keywords ie:

SELECT *
FROM Category
WHERE Supplier Like %MMColParam% OR Product_Type Like %MMColParam%

I get a syntax error in query expression error, any idears what i am doing wrong.

Thanks

John
This topic has been closed for replies.

1 reply

Inspiring
July 9, 2007
John

Try placing a ' around the the second call on the variable like this

WHERE Supplier Like %MMColParam% OR Product_Type Like '%MMColParam%'


--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"pepps" <webforumsuser@macromedia.com> wrote in message
news:f6tgk6$sub$1@forums.macromedia.com...
> Tring to create recordset from Query which is a keyword results page if i
> base
> the results page on one column of the table ie:
>
> SELECT *
> FROM Category
> WHERE Supplier Like %MMColParam%
>
> all works fine but if i want to add columns to search for keywords ie:
>
> SELECT *
> FROM Category
> WHERE Supplier Like %MMColParam% OR Product_Type Like %MMColParam%
>
> I get a syntax error in query expression error, any idears what i am doing
> wrong.
>
> Thanks
>
> John
>


peppsAuthor
Known Participant
July 10, 2007
Hi thanks for the reply,

I tried what you said and although when you click test it does not throw any syntax errors, when you test in on IE explorer, it will return the Like for the first one ie supplier but if you typed in a Product_type keyword, it will not return anything, but no errors apper.

Any more sugetions greatly appreciated

Thanks
peppsAuthor
Known Participant
July 10, 2007
Surley dreamweaver can handle this simple request it just sems really silly