Re: Correct Syntax for this piece of SQL ??

2003-03-01 Thread Dina Hess
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

Re: Correct Syntax for this piece of SQL ??

2003-02-26 Thread Ian Vaughan
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

RE: Correct Syntax for this piece of SQL ??

2003-02-26 Thread Pascal Peters
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

Re: Correct Syntax for this piece of SQL ??

2003-02-26 Thread Ian Vaughan
, 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

RE: Correct Syntax for this piece of SQL ??

2003-02-26 Thread Pascal Peters
-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 ??

2003-02-26 Thread Ian Vaughan
: 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

RE: Correct Syntax for this piece of SQL ??

2003-02-26 Thread Pascal Peters
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

Re: Correct Syntax for this piece of SQL ??

2003-02-26 Thread Ian Vaughan
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

RE: Correct Syntax for this piece of SQL ??

2003-02-25 Thread Andre Mohamed
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

RE: Correct Syntax for this piece of SQL ??

2003-02-25 Thread Larry Juncker
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

RE: Correct Syntax for this piece of SQL ??

2003-02-25 Thread Pascal Peters
(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

Re: Correct Syntax for this piece of SQL ??

2003-02-25 Thread Jann VanOver
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