Hi ,
 problem is in this line:
<CFSET subList=ListToArray(#GetSubweb.id_subweb#, ",")>

Try this:
use this function to change that column to a list ,
ValueList(query.column [, delimiter ])
then use listToArray to change it to an array.


Sima



                                                                                       
   
                    "Rosa, Issac"                                                      
   
                    <issac.rosa@a        To:     CF-Talk <[EMAIL PROTECTED]>   
   
                    ttws.com>            cc:                                           
   
                                         Subject:     Query result in another query    
   
                    10/19/00                                                           
   
                    03:41 PM                                                           
   
                    Please                                                             
   
                    respond to                                                         
   
                    cf-talk                                                            
   
                                                                                       
   
                                                                                       
   



Here's what I'm trying to accomplish.

I am querying a table that will give multiple values for a field (e.g. id =
9,4). I need to then use these ids to run another query.

Here's my current code that does not generate an error, but does not run
the
query more than once and only outputs the first ids data.  Any thoughts or
suggestions would be greatly appreciated.

This query returns 9 and 4 as id_subweb
CFQUERY NAME="GetSubweb" DATASOURCE="#dsn#">
SELECT          id_view, id_subweb
FROM                 mom_category_views
WHERE           username = '#session.username#'
</cfquery>

<CFSET subList=ListToArray(#GetSubweb.id_subweb#, ",")>

<cfloop index=i from=1 to=#ArrayLen(subList)#>
           <cfquery name="GetRolloverDetails" datasource="#dsn#">
                     SELECT         *
                     FROM                      mkt_rollovr_subweb_ref
                     WHERE          id_subweb = #subList[i]#
           </cfquery>
</cfloop>

<cfoutput query="GetRolloverDetails">
                     #mission_statement# <br>
</cfoutput>


If you have any questions or concerns, please feel free to call me at
407-514-5021.

Thank you,

> Issac Rosa
>
> IT - National Sales & Marketing
> OLAP Specialist Team Leader
> Ofc: 407-514-5021
> Cell: 407-342-0644
> Fax: 407-514-5988
> [EMAIL PROTECTED]
>
------------------------------------------------------------------------------------------------

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to
[EMAIL PROTECTED]




------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to