Re: sql list syntax

2000-03-30 Thread James Sleeman

---Reply to mail from Chris Giminez about sql list syntax
> I am doing that.. sort of.
> 
> I have
> '#form.city#' like '%des_city%'
> 

% is a wild card character - like .* in regexp, so what you are saying
there is "return true if the contents of form.city is the same as some
number (posibly 0) characters followed by des_city
followed by some more (possibly 0) characters".  What you want is Des_City
LIKE '%#FORM.CITY#%'.


 


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: sql list syntax

2000-03-29 Thread Chris Giminez

I am doing that.. sort of.

I have
'#form.city#' like '%des_city%'


The #form.city# will have one city name, and the field des_city may have one or many 
city names in a
comma deliimited list.
This is executing without an error, but it is not returning any records, where I know 
the values
should match.
I don't know if comma delimited lists have to be dealt with or can be dealt with in a 
special
manner.

Chris


> > What is the sql syntax for checking if a form field value is
> > contained in the contents of a comma
> > delimted list of values in a field?
>
> I think about the only way to do it is using:
>
> LIKE '%#form.name#%'
>
> Thus, if your db field contained 'nuts,bolts,nail,gun' and your form field
> was 'bolts', the record would match.
>
> Is that what your are trying to do?
>
> - Sean
>
> ~
> Sean Daniels
> Manager of Engineering
> DealStream, Inc.
> [EMAIL PROTECTED]
> ~
> tel: 207.439.6030
> cel: 978.764.0799
> Fax: 240.269.6319
>
>
>
> --
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
>

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: sql list syntax

2000-03-29 Thread Sean Daniels

> What is the sql syntax for checking if a form field value is
> contained in the contents of a comma
> delimted list of values in a field?

I think about the only way to do it is using:

LIKE '%#form.name#%'

Thus, if your db field contained 'nuts,bolts,nail,gun' and your form field
was 'bolts', the record would match.

Is that what your are trying to do?

- Sean

~
Sean Daniels
Manager of Engineering
DealStream, Inc.
[EMAIL PROTECTED]
~
tel: 207.439.6030
cel: 978.764.0799
Fax: 240.269.6319



--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.