Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 SQL wont work

Author  Topic 

malhyp
Starting Member

21 Posts

Posted - 2005-12-12 : 08:32:13
Can anyone suggest why this SQL wont work?

Someone has suggested that I have a few " in the wrong place.
I am missing the basic understanding about variable / string concatenation.

SELECT SupplierName, Location, ShortDescription FROM Query1 WHERE 'TimberSpecies' LIKE '%" & " + Replace(rsSearchResult__MMColParam, "'", "''") + " & "%' AND 'CategoryTable' LIKE '%" & " + Replace(rsSearchResult__MMColParam2, "'", "''") + " & "%' AND 'Location' LIKE '%" & " + Replace(rsSearchResult__MMColParam3, "'", "''") + " & "%' ORDER BY SupplierName"

Thanks

Mally.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-12-12 : 08:39:08
duplicate post [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=58971[/url]
Please don't cross post

-----------------
[KH]

Go to Top of Page
   

- Advertisement -