very basic query error???

2008-06-20 Thread Richard White
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 T_Site. Incorrect conditional expression, Incorrect conditional 
expression, Lexical error at line 0, column 0. Encountered: , (44), after : 
%

can anyone guess what i am doing wrong here

thanks





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307866
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 T_Site. Incorrect conditional expression, Incorrect conditional 
 expression, Lexical error at line 0, column 0. Encountered: , (44), after : 
 %

 can anyone guess what i am doing wrong here

 thanks





 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307867
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307868
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307871
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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.. 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

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307875
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 and formats 
and then i am just about to use the query2excel function but am trying to run 
some filters on it first to get rid of some of the data

would a comma delimited list in a coldfusion query object cause this error? and 
if so how can i get around it

thanks


~Brad

I don't think you can have them.. Perhaps you can escape them? /,?


 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
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307878
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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 preservesinglequotes 
function and it gets rid of that problem

i am still getting a problem regarding a null pointer though and cannot work 
out what it is referring to

thanks

I don't think you can have them.. Perhaps you can escape them? /,?


 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
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307879
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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 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 
 and formats and then i am just about to use the query2excel function 
 but am trying to run some filters on it first to get rid of some of 
 the data
 
 would a comma delimited list in a coldfusion query object cause this 
 error? and if so how can i get around it
 
 thanks
 
 
 ~Brad
 
 I don't think you can have them.. Perhaps you can escape them? /,?
 
 
  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
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307882
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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 list in a coldfusion query object cause this 
 error? and if so how can i get around it
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307900
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4