Ask a Question related to Coldfusion Database Access, Design and Development.
-
runner ed #1
cfqueryparam and wildcard select for search
Quick Question.
I am having some difficulty with this select statement for a search:
SELECT * FROM table WHERE name like ''<cfqueryparam
value="#form.txtCompanySearch#" cfsqltype="cf_sql_varchar">''%'"
This statement always fails. What changes do I need to make to the syntax? I
want to be able to have the user enter the first few characters, then append a
wildcard to the variable using the cfqueryparam. I have tried different
variations to escape the % symbol but nothing seems to work.
IE: SELECT * FROM table WHERE name like 'abc%'
Thanks for the help.
runner ed Guest
-
Solution for the question: Select a single word in a text field after a search
In Filemaker 6: Define a global field named "gSearched_word" to store word that you want to find. Make a script to enter in find mode as below:... -
wildcard in SELECT
I have 96 fields named s1, s2, s3... s96 with hundreds of rows in a msSQL2000 db. I need to get the sum of the fields and was wondering if there is... -
wildcard search
I have the following SQL that searches based on the exact input stored in a session variable If reqname <> '' Then strSQL = strSQL &... -
Wildcard and DTS..?
Hi all, I have a path in a DTS-package that looks like: sFilename = "d:\path\*.PMS" & Right(Year(Now()), 2) sFilename = DTSGlobalVariables ... -
Select a single word in a text field after a search
in article PvMJa.17242$dP1.32589@newsc.telia.net, nisse@nisse.se at nisse@nisse.se wrote on 6/23/03 4:59 PM: If you're on the Mac sind, and... -
Jochem van Dieten - TMM #2
Re: cfqueryparam and wildcard select for search
runner ed wrote:
SELECT *> Quick Question.
>
> I am having some difficulty with this select statement for a search:
>
> SELECT * FROM table WHERE name like ''<cfqueryparam
> value="#form.txtCompanySearch#" cfsqltype="cf_sql_varchar">''%'"
FROM table
WHERE name like <cfqueryparam value="#form.txtCompanySearch#%"
cfsqltype="cf_sql_varchar">
Jochem
--
Jochem van Dieten
Team Macromedia Volunteer for ColdFusion, beer and fun.
Jochem van Dieten - TMM Guest
-
The ScareCrow #3
Re: cfqueryparam and wildcard select for search
like so,
SELECT * FROM table WHERE name like <cfqueryparam value="#form.txtCompanySearch#%" cfsqltype="cf_sql_varchar">
Ken
The ScareCrow Guest
-



Reply With Quote

