2:49 PM
Subject: RE: Correct Syntax for this piece of SQL ??
You cannot use cfqueryparam with cached queries. Go back to
UPPER('%#Trim(form.var)#%')
-Oorspronkelijk bericht-
Van: Ian Vaughan [mailto:[EMAIL PROTECTED]
Verzonden: wo 26/02/2003 14:17
Aan: CF-Talk
CC
criteria do no have to be met,
Any ideas why the above sql is returning all results ??
Ian
- Original Message -
From: Jann VanOver [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 5:48 AM
Subject: Re: Correct Syntax for this piece of SQL ??
I think Lee said
bericht-
Van: Ian Vaughan [mailto:[EMAIL PROTECTED]
Verzonden: wo 26/02/2003 10:20
Aan: CF-Talk
CC:
Onderwerp: Re: Correct Syntax for this piece of SQL ??
Hi
I have just tried the following query
, February 26, 2003 10:12 AM
Subject: RE: Correct Syntax for this piece of SQL ??
If one of your form variables is empty, it will always return all the
records because you match '%%' (which means anything). If you want to match
one of the criteria you entered, this should work:
SELECT *
FROM funding
-Talk
CC:
Onderwerp: Re: Correct Syntax for this piece of SQL ??
Pascal
Thanks for your solution but it does not work, I am using CF 4.5 and Oracle
8. I am getting the following error when using your code
: RE: Correct Syntax for this piece of SQL ??
This should work on ORACLE8/CF4.5.1 (I'm developping for that platform
right now)
I can't make much of your error. Can you post your entire cfquery.
CFQUERYPARAM is used for parameterized sql. It is usually good for
performence and it helps to avoid
26, 2003 11:34 AM
Subject: RE: Correct Syntax for this piece of SQL ??
This should work on ORACLE8/CF4.5.1 (I'm developping for that platform
right now)
I can't make much of your error. Can you post your entire cfquery
for this piece of SQL ??
You cannot use cfqueryparam with cached queries. Go back to
UPPER('%#Trim(form.var)#%')
-Oorspronkelijk bericht-
Van: Ian Vaughan [mailto:[EMAIL PROTECTED]
Verzonden: wo 26/02/2003 14:17
Aan: CF-Talk
CC:
Onderwerp: Re: Correct Syntax for this piece of SQL
Just a stab in the dark:
Is orgname always uppercase in your DB? If so, that might explain why
searching by orgname always works but searching by the others doesn't.
You might have to do this:
...AND UPPER(funding) LIKE UPPER('%#Form.funding#%')
or EVEN (the same):
...AND UPPER(funding) LIKE
Try this:
CFQUERY datasource=liv8 name=funding
cachedwithin=#CreateTimeSpan(0,6,0,0)# blockfactor=100
select * from
funding
cfif form.orgname gt
Where orgname LIKE UPPER('%#Form.orgname#%')
/cfif
cfif form.funding gt
cfif form.orgname gt ANDcfelseWHERE/cfif
funding LIKE
(form.commapproval)
AND UPPER(commapproval) LIKE UPPER(cfqueryparam
cfsqltype=CF_SQL_VARCHAR value=%#Form.commapproval#%)
/cfif
-Original Message-
From: Larry Juncker [mailto:[EMAIL PROTECTED]
Sent: dinsdag 25 februari 2003 15:59
To: CF-Talk
Subject: RE: Correct Syntax for this piece of SQL ??
Try
I think Lee said it too, you've got a basic logic flaw. Your query says all
three criteria must be met.
Did you mean to say:
select * from
funding
Where ( orgname LIKE '%#Form.orgname#%' )
OR( funding LIKE '%#Form.funding#%' )
OR( commapproval LIKE '%#Form.commapproval#%' )
ORDER BY
12 matches
Mail list logo