I'm not sure that would do what I need, or I'm not understanding. Here's a snippet of the code I'm using. I'm pulling the column names from a table and passing the list to my query and then using the list as the first row in a csv file.
<!--- fetch the columns in a table ---> <cfdbinfo type="columns" datasource="#application.ds#" name="columnMetaData" table="#URL.TABLE#"> <cfset columns = ""> <cfloop query="columnMetaData"> <cfset columns = columns&"#column_name#,"> </cfloop> <!--- remove the last comma ---> <cfset columns = left(columns,evaluate(len(columns) -1))> <cfquery datasource="#application.ds#" name="pull_data"> SELECT #columns# FROM #URL.TABLE# </cfquery> <cfset yopath = "#application.masterpath#/#dateFormat(now(), "yyyy_mm_dd")#_#URL.TABLE#.csv"> <cffile action="WRITE" file="#yopath#" output="#columns#" addnewline="yes"> <cfloop query="pull_data"> <cffile action="APPEND" file="#yopath#" output="<!--- This is where I need variables with the same names as the columns --->" addnewline="yes"> </cfloop> ~Steve http://lanctr.com/ -----Original Message----- From: Azadi Saryev [mailto:[EMAIL PROTECTED] Sent: Monday, May 05, 2008 9:46 PM To: CF-Talk Subject: Re: create variables from a string why not just cfloop over the list and create all vars you need? Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Steve Good wrote: > Is there a way to create named variables from a dynamic list (the list > doesn't always have the same number of elements)? > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304774 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4