Re: very basic query error???

2008-06-20 Thread Phillip Vector
select * from query where T_Site like '%1%' On Fri, Jun 20, 2008 at 3:28 PM, Richard White [EMAIL PROTECTED] wrote: Hi i have this very simple line of code that i am trying to run in a query of query: select * from query where T_Site like '%,1,%' but i am getting the error: Encountered

Re: very basic query error???

2008-06-20 Thread Richard White
hi, i need the commas in the like clause though, how can i get these in there? thanks ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: very basic query error???

2008-06-20 Thread Phillip Vector
I don't think you can have them.. Perhaps you can escape them? /,? On Fri, Jun 20, 2008 at 3:36 PM, Richard White [EMAIL PROTECTED] wrote: hi, i need the commas in the like clause though, how can i get these in there? thanks

RE: very basic query error???

2008-06-20 Thread Brad Wood
You aren't by chance storing a comma-delimited list in a single column a database are you? :) ~Brad -Original Message- From: Phillip Vector [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2008 5:41 PM To: CF-Talk Subject: Re: very basic query error??? I don't think you can have them

Re: very basic query error???

2008-06-20 Thread Richard White
You aren't by chance storing a comma-delimited list in a single column a database are you? :) hi brad, well not in the database but this particular column in the coldfusion query at this point could have comma delimited lists. this query is something i have created out of various other queries

Re: very basic query error???

2008-06-20 Thread Richard White
i have actually used this in other queries and it does work fine and pulls out the data as required, its just that in this one i am having problems i have managed now to get rid of the error above, its becuase it was trying to change the single quotes to double quotes. so i used the

Re: very basic query error???

2008-06-20 Thread Richard White
josh managed to find the solution in this post: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56796 it was down to some cells in that column being null when using the like clause - i had to include where T_Site is not null and now it is working fine You aren't by chance

Re: very basic query error???

2008-06-20 Thread Brad Wood
No, there shouldn't he any problems storing a comma delimited list-- it's just bad normalization since a list isn't an atomic value. If you are searching for 1 make sure you account for the following lists: 1,2,3 3,2,1 2,1,3 %,1,% is only work for one of those. ~Brad would a comma delimited