Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFQUERY Syntax

Status
Not open for further replies.

scripter73

Programmer
Joined
Apr 18, 2001
Messages
421
Location
US
Hi,

What's the proper syntax for doing a partial WHERE statement in a CFQUERY?

I want to say the following:

<cfquery name=&quot;getivr&quot; datasource=&quot;#session.dsn#&quot;>
select vr00_branch,
vr00_company,
vr00_product,
vr00_policy_number,
vr00_uprate_reasons,
vr00_orig_issued_tot
from ARIVR
where (LAST 5 CHARACTERS OF FIELD = Left(VARX,5))
</cfquery>

Can this be done? If you could help me out, I'd really appreciate it.

Thanks,
scripter73
Change Your Thinking, Change Your Life.
 
use the wild card '%':

WHERE field = '%htrrz'

this will return all the fields that end with 'htrrz'

Sylvano
dsylvano@hotmail.com
 
Many thanks!

I really appreciate it.

scripter73
Change Your Thinking, Change Your Life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top