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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SQL wont work

Author  Topic 

malhyp
Starting Member

21 Posts

Posted - 2005-12-12 : 08:30:42
Can anyone suggest whey 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:38:16
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 -