var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQL wont work
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"
this sure looks familiar, didn't you post this in other forums? i'm sure i've answered this very question before
'TimberSpecies' is a character string
TimberSpecies is a column name
the trick to writing successful sql is to test the sql outside of whatever scripting language you're using (asp? vb? jsp? foo?)
test it right in the sql window of your favourite sql front end gui utility tool
please also see this answer over here -- http://www.dbforums.com/t1204443.html
Re: SQL Help
I understand what you are saying there but when i do as mentioned.
SELECT SupplierName, Location, ShortDescription
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.
your answer is over here -- http://www.dbforums.com/t1204443.html
may i please ask you not to keep all seven of your threads going? please, just settle on one