Hi: Given that your datasource points at one database only, I think you need to do two cfqueries. Unless you can link tables in MySQL.
Patrick > -----Original Message----- > From: FlashGuy [mailto:flashmx@;rogers.com] > Sent: Thursday, October 31, 2002 11:09 AM > To: CF-Community > Subject: Is this possible? > > > I'm running CF and MySQL. I want to be able to read in a > field "env_var" from one database and update/insert the > results into another database. Can this be done with just > one <cfquery or do I have to do it with two or multiple ones? > > <cfquery name="GetAlias" datasource="alias" dbtype="ODBC"> > SELECT env_var > FROM alias > SORT ORDER BY env_var > > ..some code here that inserts the results into the database > below as comma-demilted text... > > </cfquery> > > This above query list 849 entries. > > I want to take all these entries and create a comma-delimited > variable that gets shoved into another database field for > future reference. > > <cfset commalist = valuelist(GetAlias.env_var)> > <cfquery name="Update" datasource="profile" dbtype="ODBC"> > UPDATE prof > SET strSelect='#commalist#' > WHERE strUsername='#auth#' > </cfquery> > > > --------------------------------------------------- > Colonel Nathan R. Jessop > Commanding Officer > Marine Ground Forces > Guatanamo Bay, Cuba > --------------------------------------------------- > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_community Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
