> > You are trying to select where menuId = foundOn.  I'm guessing 
> foundOn 
> > 
> > is a text field.  Check your subselect.
> > 
> > --Ben Doom
> > 
> > erik tom wrote:
> > > I have a column datatype text. And when i try to run the query I 
> get 
> > the error
> > > [Macromedia][SQLServer JDBC Driver][SQLServer]Operand type clash: 
> 
> > text is incompatible with int 
> > > The query is 
> > > select menuId,label,foundOn from dbo.menu where menuId IN (select 
> 
> > foundOn from dbo.menu where menuId=#form.selTopLevel2#) order by 
> > menuId 
> > > 
> > > 
> 
> You are correct foundOn is text datatype so how can I convert the 
> subquery so it becomes int datatype

Can you run the query in SQL Analyzer? If so, create a stored proc and call 
that. SQL provides capabilities for CASTing types.

I do not understand your query, however. Looking at your subquery alone, it 
appears that you will return foundOn for the given menu id. The outer query 
then joins foundOn with MenuId. Are you saying the list returned in foundOn 
will contain the specified MenuId along with others? Is this meant to be some 
sort of recursive relationship (if so, a poor way to model it, IMHO)?


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

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

Reply via email to