If you are using foundOn as a list of menuId's, I would strongly suggest 
that you reconsider your db layout.

I would, instead, use what is generally called a "join table" or "link 
table" that allows you to do basically the same thing, but in a cleaner, 
more normalized way that doesn't require special tricks.

If you need more of a pointer than that, Google the terms first.  It's a 
pretty basic db concept.

--Ben Doom

erik tom wrote:
>> 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
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:299515
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to